Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] StackOverflowError in the DOM Parser

Dear CDT Developers,

I was testing the CDT Parser using a plugin that traverses the AST and
resolves Bindings for Function Calls. I tried to create the AST and
resolve Bindings of called functions for the Mozilla 1.7 source.
No includes where added to the CProject.  I just opened a new C++
Standard Make Project and added the mozilla sources. Then I ran my
visitor on the project (without compiling the project before).

A StackOverflow occured when traversing the file
./mozilla-1.7/content/xul/templates/src/nsXULTemplateBuilder.cpp at line
1136. At this line there is a function call to the function
ParseAttribute:

ParseAttribute(aAttributeValue, IsVarInSet, nsnull, &closure);

Maybe this is a rare case, but I think the parser should not cause an
Error, no matter what the input is.
I spend some time on debugging but did not really succeed in finding the
actual cause. I think the whole thing goes up when the parameter
IsVarInSet (a function pointer) is resolved. I also found that CPPScope
contains two IASTNames with the 
for ParseAttribute - maybe there is a problem.
Unfortunately I do not have the resources now to really dig into the CDT
code and resolve the problem, but maybe somebody that knows the code in
and out can find a quick solution.

Please find the error report attached.
To reproduce the example, I added a small visitor and the mozilla source
files that caused the error (to reproduce the error it is sufficient to
add only the files nsXULTemplateBuilder.cpp and nsXULTemplateBuilder.h)

Please let me know if this is a known issue and maybe you can provide a
workaround, otherwise I can report the bug in the bugzilla.

Regards,

Johannes


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Attachment: error.log
Description: error.log

Attachment: nsXULTemplateBuilder.cpp
Description: nsXULTemplateBuilder.cpp

Attachment: nsXULTemplateBuilder.h
Description: nsXULTemplateBuilder.h

Attachment: CPPFunctionCallsVisitor.java
Description: CPPFunctionCallsVisitor.java


Back to the top