Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.7.0
-
None
-
$ uname -a
Linux black 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version
g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904
Copyright (C) 2015 [snip]
$ ldconfig -v | grep stdc++
...
libstdc++.so.6 -> libstdc++.so.6.0.22
libstdc++.so.6 -> libstdc++.so.6.0.22
QtCreator:
Based on Qt 5.7.0 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit)
Built on Aug 24 2016 14:58:22
From revision 8c80a86266
$ uname -a Linux black 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ g++ --version g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904 Copyright (C) 2015 [snip] $ ldconfig -v | grep stdc++ ... libstdc++.so.6 -> libstdc++.so.6.0.22 libstdc++.so.6 -> libstdc++.so.6.0.22 QtCreator: Based on Qt 5.7.0 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit) Built on Aug 24 2016 14:58:22 From revision 8c80a86266
Description
In the process of identifying the cause of some SIGSEGVs in a desktop application, I tried efence (http://elinux.org/Electric_Fence) then duma (http://duma.sourceforge.net/). To my surprise, linking against any of them causes a SIGSEGV during the init sequence and the core dump accuses `QByteArray::append(char)` as the culprit.
Note: I'm not interested in memleaks and the actual app I need diagnosis is multithreaded (I suspect race conditions) - therefore I skipped valgrind/memcheck for efence/duma.
To avoid any negative interference with the code in the app (statics and whatnot), I decided to test efence/duma with an empty application. Double surprise, the issue persists.
—
*Brief of environment:* Ubuntu 14.04, gcc 5.4.1 / libstdc++.6, Qt 5.7.0 in user home installation, efence/duma as distributed by the ubuntu repos (neither efence nor duma have had a new release for ages), QtCreator 4.8.1.
—
*Steps to reproduce:*
- make sure your OS is configured to generate core dumps (`ulimit -c unlimited`, but I took a step further and configured 'limits.d' - /etc/security/limits.conf worked for my case)
- using QtCreator, create a "Qt widget app" project (my name: QtDummy)
- Right click on the project and "Add library...". Choose "/usr/bin/duma.so" - or whatever location your OS stores the duma shared lib (the .pro file gets appended with "unix:!macx: LIBS += -lduma")
- in "Projects/DefaultKit/Run" set a check on "Run on terminal"
- In "Tools/Options" menu, at "Envirnment/System" settings, set the "/usr/bin/xterm -e" for the "Terminal"
- build the project. I managed to repro even with a debug build. The make log will be attached
- run it
Expected results: see the default window appear.
Actual result:
- SIGSEGV and core dump
- loading the core into gdb and backtracing shows something like:
Core was generated by `/home/acolomitchi/projects/Qt/QtDummy/build/QtDummy-Desktopglb-Debug/QtDummy'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f9cc331d2b3 in QByteArray::append(char) () from /home/acolomitchi/bin/Qt/5.7/gcc_64/lib/libQt5Core.so.5 (gdb) bt #0 0x00007f9cc331d2b3 in QByteArray::append(char) () from /home/acolomitchi/bin/Qt/5.7/gcc_64/lib/libQt5Core.so.5 #1 0x00007f9cc3b3a7c3 in ?? () from /home/acolomitchi/bin/Qt/5.7/gcc_64/lib/libQt5Widgets.so.5 #2 0x00007f9cc43f910a in call_init (l=<optimised out>, argc=argc@entry=1, argv=argv@entry=0x7ffc3ff910c8, env=env@entry=0x7ffc3ff910d8) at dl-init.c:78 #3 0x00007f9cc43f91f3 in call_init (env=<optimised out>, argv=<optimised out>, argc=<optimised out>, l=<optimised out>) at dl-init.c:36 #4 _dl_init (main_map=0x7f9cc460d1c8, argc=1, argv=0x7ffc3ff910c8, env=0x7ffc3ff910d8) at dl-init.c:126 #5 0x00007f9cc43ea30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #6 0x0000000000000001 in ?? () #7 0x00007ffc3ff916d6 in ?? () #8 0x0000000000000000 in ?? () (gdb)
—