Closed
Bug 432769
Opened 16 years ago
Closed 16 years ago
Dehydra/Treehydra: should not cast location_t to int on a mac
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: vladimir.sukhoy, Unassigned)
References
Details
Attachments
(1 file)
1.62 KB,
patch
|
dmandelin
:
review+
|
Details | Diff | Splinter Review |
In dehydra.c: dehydra_defineProperty (this, obj, "_source_location", INT_TO_JSVAL(loc)); breaks mac because loc is larger than int there. Can't we just store bytes of it in a JS string or something?
Updated•16 years ago
|
Summary: should not cast location_t to int on a mac → Dehydra/Treehydra: should not cast location_t to int on a mac
Comment 1•16 years ago
|
||
What exactly is the failure mode? If the values actually fit in ints, then it could be made to work by adding another cast or something.
Reporter | ||
Comment 2•16 years ago
|
||
it doesn't fit in an int. because it is as follows: struct GTY(()) location_s { /* The name of the source file involved. */ const char *file; /* The line-location in the source file. */ int line; }; typedef struct location_s expanded_location; typedef struct location_s location_t; typedef location_t *source_locus; so it's an int and a pointer.
Comment 3•16 years ago
|
||
OK, given this I think you can just leave off _source_location on the Mac, and then just modify Diagnostic() to set up a new location_s structure if needed for %H.
Comment 4•16 years ago
|
||
Is this specific to mac or to gcc 4.2? Probably ought to file these bugs as "shouldn't do X on GCC 4.2" if that's actually the difference.
Reporter | ||
Comment 5•16 years ago
|
||
Not sure how gcc 4.2 is configured on linux by default. This is actually specific to apple's gcc42 config not using USE_MAPPED_LOCATION define during gcc build which turns on mapped locations (and columns in them). I am not sure why apple does it this way with their gcc.
Reporter | ||
Comment 6•16 years ago
|
||
Attachment #320075 -
Flags: review?
Reporter | ||
Updated•16 years ago
|
Attachment #320075 -
Flags: review? → review?(dmandelin)
Comment 7•16 years ago
|
||
Comment on attachment 320075 [details] [diff] [review] fix Perfect.
Attachment #320075 -
Flags: review?(dmandelin) → review+
Reporter | ||
Comment 8•16 years ago
|
||
Pushed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•