Bug report #4944
GIT snapshot fails to build with segfault
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Linux||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||14741|
While trying to build from GIT, sip segfaults when executing this specific command line:
sip -e -x QSETINT_CONVERSION -x QSETTYPE_CONVERSION -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_7_1 -x Py_v3 -g -j 4 -c /Files/Compile/Sources/QGIS-git/_build/python/core -I /Programs/PyQt/4.9/Shared/sip -I /Files/Compile/Sources/QGIS-git/python /Files/Compile/Sources/QGIS-git/python/core/core.sip
The file given as input, python/core/core.sip, has a list of files that are included and processed by sip. The one which is causing trouble is python/core/qgexception.sip.
Inspecting with gdb, it looks like appendCodeBlock() is being called by parser.py with an invalid value for $5.type_header_code. That argument (which is expected to be a codeBlock ptr) has a constant value of 0x3ff00000, which is invalid. That pointer is afterwards dereferenced by generateCppCodeBlock() in gencode.c, which attempts to get the value of that codeBlock's "filename" member. I'm attaching a stack trace showing the context of the code when that weird argument is first received by appendCodeBlock().
Since I'm not familiar with the structure of the code I'm stuck on the problem and seeking for some advice. Is there any particular requirements on the versions of the tools used to build QGIS from source? I remember having built it from source before without stepping on such problems.