After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 363067 - Multiple Symbols in pycode.l Crashes Doxygen
Multiple Symbols in pycode.l Crashes Doxygen
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2006-10-18 06:07 UTC by Kevin McBride
Modified: 2006-11-01 17:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (2.97 KB, application/x-gzip)
2006-10-18 06:09 UTC, Kevin McBride
  Details
Proposed Patch (1.04 KB, patch)
2006-10-18 06:34 UTC, Kevin McBride
none Details | Review

Description Kevin McBride 2006-10-18 06:07:12 UTC
*** This bug was imported from the mailing list ***

Doxygen segfaults at line 758 of pycode.l (the full call stack is below).

     if (g_currentDefinition)
     {
       DefinitionIntf *di = Doxygen::symbolMap->find(symName);
-->   if (di->definitionType()==DefinitionIntf::TypeSymbolList) //  
multiple symbols 

di = 0x0000000, which is causing the crash.

I don't know if this matters, but symName = "SuspendLayout", which is  
a method my code calls, but the definition of that method doesn't  
exist in any of the source that doxygen is parsing.

Call stack:
 >	doxygen.exe!findMemberLink(CodeOutputInterface & ol={...}, char *  
symName=0x01eecf22)  Line 758 + 0x3 bytes	C++
	doxygen.exe!pycodeYYlex()  Line 963 + 0x15 bytes	C++
	doxygen.exe!parsePythonCode(CodeOutputInterface & od={...}, const  
char * className=0x009aac56, const QCString & s={...}, bool  
exBlock=false, const char * exName=0x009aac56, FileDef *  
fd=0x0174cd38, int startLine=-1, int endLine=-1, bool  
inlineFragment=true, MemberDef * __formal=0x00000000)  Line 1427	C++
	doxygen.exe!PythonLanguageScanner::parseCode(CodeOutputInterface &  
codeOutIntf={...}, const char * scopeName=0x00000000, const QCString  
& input={...}, bool isExampleBlock=false, const char *  
exampleName=0x00000000, FileDef * fileDef=0x0174cd38, int  
startLine=-1, int endLine=-1, bool inlineFragment=false, MemberDef *  
memberDef=0x00000000)  Line 1592 + 0x2d bytes	C++
	doxygen.exe!FileDef::writeSource(OutputList & ol={...})  Line 664 +  
0x89 bytes	C++
	doxygen.exe!generateFileSources()  Line 6748 + 0xe bytes	C++
	doxygen.exe!generateOutput()  Line 9636	C++
	doxygen.exe!main(int argc=2, char * * argv=0x015f2de0)  Line 39	C++
	doxygen.exe!__tmainCRTStartup()  Line 318 + 0x19 bytes	C
	doxygen.exe!mainCRTStartup()  Line 187	C
	kernel32.dll!7c816fd7() 	
	[Frames below may be incorrect and/or missing, no symbols loaded for  
kernel32.dll]	
	ntdll.dll!7c911414() 	
	doxygen.exe!ManGenerator::enable()  Line 35 + 0x43 bytes	C++
	doxygen.exe!FTVHelp::generateIndent(QTextStream & t={...}, FTVNode *  
n=0x0075006c, int level=115)  Line 468	C++
	doxygen.exe!Config::check()  Line 1217 + 0x1d bytes	C++
	doxygen.exe!commentScanYYlex()  Line 1420 + 0xb bytes	C++
	8b00a155()
Comment 1 Kevin McBride 2006-10-18 06:09:05 UTC
Created attachment 74921 [details]
Testcase
Comment 2 Kevin McBride 2006-10-18 06:12:28 UTC
I am having the same problem also.  As a result, I am not building the RPMs for 1.5.0 until Dimitri comments on this bug report.

My stacktrace is below:

Generating code for file AdminUI.py...

Program received signal SIGSEGV, Segmentation fault.
0x0821ce5e in findMemberLink (ol=@0xa053dd0,
    symName=0xb793b23c "SuspendLayout") at pycode.l:758
758         if (di->definitionType()==DefinitionIntf::TypeSymbolList) // multiple symbols
(gdb) bt
  • #0 findMemberLink
    at pycode.l line 758
  • #1 pycodeYYlex
    at pycode.l line 963
  • #2 parsePythonCode
    at pycode.l line 1425
  • #3 PythonLanguageScanner::parseCode
    at pyscanner.l line 1592
  • #4 FileDef::writeSource
    at filedef.cpp line 664
  • #5 generateFileSources
    at doxygen.cpp line 6748
  • #6 generateOutput
    at doxygen.cpp line 9634
  • #7 main
    at main.cpp line 38

Comment 3 Kevin McBride 2006-10-18 06:34:57 UTC
Created attachment 74922 [details] [review]
Proposed Patch

The following patch will check for a NULL reference that is causing the crash.  I am not sure how python processing is affected by the patch, so comments are needed.
Comment 4 Dimitri van Heesch 2006-10-18 17:05:39 UTC
The proposed patch is accepted. So please use it when building RPMs.
Comment 5 Kevin McBride 2006-11-01 17:59:11 UTC
I confirm that this is fixed in 1.5.1.