Closed Bug 431236 Opened 16 years ago Closed 16 years ago

Treehydra: Segfaults in attempt to access 'u5' union member(inner functions should be called eagerly)

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmandelin, Unassigned)

References

Details

Attachments

(2 files)

Apparently this is caused by generated code in lazy_lang_decl storing pointers to GCC inline functions on the heap, which then get called later in ResolveTreeNode, when they are invalid.
Status: NEW → ASSIGNED
Summary: Treehydra: Segfaults in attempt to access 'u5' union member → Treehydra: Segfaults in attempt to access 'u5' union member(inner functions should be called eagerly)
Not that I have any strong opinions on this, but I was thinking "not using nested functions" was a reasonable alternate solution. :-)
It's reasonable, but it's much easier with nested functions. If one starts inlining what's currently nested functions then convert_tree gets a lot more complicated. I tried that approach and it was messy, the generated code looked uglier and I couldn't bother to rewriting large parts of convert_tree js once I realized how much simpler nested functions are. Personally, I think nested functions should be part of the C/C++ standards, as they allow for much more concise code.
Attached file Test case C++ file
Happens on mac too.
pushed fix
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: