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

RESOLVED FIXED

Status

defect
RESOLVED FIXED
11 years ago
Last year

People

(Reporter: dmandelin, Unassigned)

Tracking

Trunk
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

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.
Posted file Test case C++ file
Happens on mac too.
pushed fix
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.