Closed Bug 575398 Opened 14 years ago Closed 14 years ago

dehydra: circular typedef field generated with attribute __aligned__

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ehren.m, Unassigned)

References

Details

Attachments

(2 files)

Turns out the fix was pretty easy, although this seems like a genuine gcc bug in that DECL_ORIGINAL_TYPE(TYPE_NAME(type)) == type. As far as I can tell only __attribute__((__aligned__)) triggers this weirdness.
Attached patch patchSplinter Review
Attachment #454634 - Flags: review?(tglek)
Comment on attachment 454634 [details] [diff] [review]
patch

please file a gcc bug to
Attachment #454634 - Flags: review?(tglek) → review+
http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/2f6776affb9f
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Here is what I get with this patch applied:

Test Failure: 
    Test command: /usr/bin/g++-4.5 -c -fplugin=../gcc_dehydra.so -o /dev/null -fplugin-arg-gcc_dehydra-script=test_typedef_aligned.js typedef_aligned.cc
    Failure msg: Expected 'OK' output; Errors:
 typedef_aligned.cc:2:37: error: Must be 5 tests run, instead ran 1
Attached patch test fixSplinter Review
Thanks for pointing this out. I can confirm that with 4.5 tip this struct is only visited once (as opposed to with 4.5.0). I've changed the test to require that 1 visit minimum is made without hardcoding the number of visits.

Mike, I could just land it, but do you mind giving this a look?
Attachment #456910 - Flags: review?(mh+mozilla)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 456910 [details] [diff] [review]
test fix

I can't comment on the correctness, but at least, the test passes. Thanks.
Attachment #456910 - Flags: review?(mh+mozilla) → review+
http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/e0c21d67fa42
Status: REOPENED → RESOLVED
Closed: 14 years ago14 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

Creator:
Created:
Updated:
Size: