Bug report #4944

GIT snapshot fails to build with segfault

Added by Lucas Villa Real over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
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

Description

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.

Thanks!

qgis-stacktrace.txt Magnifier - A stack trace showing the context of the code when that weird argument is first received by appendCodeBlock(). (161 KB) Lucas Villa Real, 2012-02-03 11:50 AM


Related issues

Duplicates QGIS Application - Bug report #4941: sip crash on some 32bit platforms Closed 2012-02-03

History

#1 Updated by Jürgen Fischer over 8 years ago

Thanks. I just tracked it down and came to the same conclusion :) See #4941 for details.

#2 Updated by Lucas Villa Real over 8 years ago

Ah, nice! I just saw the patch -- thanks much for the fix!

#3 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF