Version: unspecified (using KDE 4.5.80) OS: Linux When building kdebindings trunk, the build process segfaults while running generator/bin/smokegen -config .../smoke/qt/qimageblitz/../qtcore/config.xml -smokeconfig .../smoke/qt/qimageblitz/smokeconfig-xml -I /usr/include/qimageblitz/ -- .../smoke/qt/qimageblitz/qimageblitz_includes.h Reproducible: Always Steps to Reproduce: Compile kdebindings Actual Results: Crash Expected Results: Builds Backtrace from running smokegen with the same parameters in gdb: using generator ".../generator/bin/generator_smoke.so" parsing ".../smoke/qt/qimageblitz/qimageblitz_includes.h" Program received signal SIGSEGV, Segmentation fault. #0 ... in ?? () from /usr/lib64/qt4/lib64/libQtCore.so.4 #1 ... in QString::toUtf8() const () from /usr/lib64/qt4/lib64/libQtCore.so.4 #2 ... in IndexedString::byteArray (this=<value optimized out>) at .../generator/parser/indexedstring.cpp:203 #3 ... in stringFromContents (contents=<value optimized out>, count=141678) at .../generator/parser/rpp/chartools.cpp:65 #4 ... in lineFromContents (contents=<value optimized out>, lineNumber=<value optimized out>) at .../generator/parser/rpp/chartools.cpp:56 #5 ... in Parser::reportError ... at .../generator/parser/parser.cpp:372 #6 ... in Parser::syntaxError ... at .../generator/parser/parser.cpp:339 #7 ... in Parser::parseDeclarationInternal ... at .../generator/parser/parser.cpp:3584 #8 ... in Parser::parseDeclaration ... at .../generator/parser/parser.cpp:712 #9 ... in Parser::parseTranslationUnit ... at .../generator/parser/parser.cpp:613 #10 ... in Parser::parse ... at .../generator/parser/parser.cpp:192 #11 ... in main ... at .../generator/main.cpp:222
Confirmed on kubuntu. Both trunk and 4.5.85 fail with that.
you should run that through valgrind and show the log it produces valgrind --track-origins=yes --num-callers=25
This crash is currently worked around on FreeBSD with the following patch (wasn't written by me): --- ./smoke/qt/qimageblitz/qimageblitz_includes.h.orig 2010-12-02 23:13:59.013157174 +1000 +++ ./smoke/qt/qimageblitz/qimageblitz_includes.h 2010-12-02 23:14:13.726155614 +1000 @@ -2,6 +2,7 @@ # define QIMAGEBLITZ_EXPORT #endif +#include <QtCore> #include <qimageblitz.h> #include <qglobal.h>
For some reason, it doesn't crash in valgrind here (but it does still crash when run outside of valgrind). The FreeBSD workaround works here on Ark Linux as well.
that it doesn't crash is ok, but does it also not output *anything* (i.e. the usual warnings about access of uninitialized memory or similar)?
Created attachment 54271 [details] valgrind 3.4.1 output Valgrind 3.4.1 produces LOTS of errors (this time it even reproduced the crash), but most of them are in glibc, and from a quick look the remaining ones don't add much new on top of what gdb already said -- attaching its output (gzip-ed because of its size) anyway. Valgrind 3.6.0 runs into instructions it doesn't know about: vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x10 0xD1 0x66 Process terminating with default action of signal 4 (SIGILL) Illegal opcode at address 0x6021EC3 at 0x6021EC3: __m128i_strloadu_tolower_posix (in /lib64/libc-2.12.1.so) by 0x6022098: __strcasestr_sse42 (in /lib64/libc-2.12.1.so)
This is now fixed in trunk.