Closed Bug 1137919 Opened 9 years ago Closed 9 years ago

Fix internal gcc compiler error triggered by sixgill

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I just noticed that a handful of compiles during the hazard analysis are crashing gcc.

It is triggered in XIL_GlobalName by the call

    const char *mangled = decl_as_string(DECL_ASSEMBLER_NAME(decl), TFF_DECL_SPECIFIERS);

Note that the unmangled name is

"pkixcheck.cpp:<error> mozilla::pkix::CheckSubjectPublicKeyInfo(mozilla::pkix::Reader*)::__lambda0"

which contains an "<error>" token. So things are already not happy. This is preceded by the output:

XIL: Unexpected tree (type.c:795):
 <template_type_parm 0xd05d000 auto VOID
    align 8 symtab 0 alias set -1 canonical type 0xb71fc78
   index 0 level 1 orig_level 1
    chain <type_decl 0xd017c38 auto>>

The problem occurs during gcc's write_closure_type_name, which calls lambda_function(type) which returns NULL due to a failed lookup.

Ways of fixing this are (1) detecting when we get into the situation where it's going to trigger and not generating a mangled name, or (2) upgrading gcc and hoping this crash is fixed. (This is on gcc 4.8.3)

For now, I'm inclined to pattern-match on "<error>" and skip making a mangled name in that case.
I snuck a TEMPLATE_TYPE_PARM thing in here, mostly because I was curious if it's ok to just ignore random stuff like that (via TREE_BOGUS).
Attachment #8570765 - Flags: review?(bhackett1024)
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Attachment #8570765 - Flags: review?(bhackett1024) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 1246326
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: