Closed Bug 1361444 Opened 7 years ago Closed 5 years ago

Anonymous structs collide across compilation units

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1171815

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: triage-deferred)

eg if you have

struct {
  int x;
} EXES[] = { { 3 }, { 4 } };

gcc will fabricate a type named something like "._215". If one of these contains a GC pointer, and then in a different translation unit you hold a different anonymous struct with the same name across a GC, you get a baffling false positive.
For the record, this was discovered in the attempted landing of the no-bug changesets mentioned in bug 1359980 comment 6 -- changesets which did nothing other than minimize #include dependencies, ergo reduce compile time, by adding one or two forward-declarations and #include-ing less comprehensive headers.  I landed in advance of this fix by renaming the type that served the function |EXES| serves in the example in comment 0 -- anyone else who hits this for now can act similarly as a hackaround.
Keywords: triage-deferred
Priority: -- → P3

I'm not sure which way to dupe, but I guess it doesn't matter.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.