Closed
Bug 596608
Opened 14 years ago
Closed 14 years ago
_to_method_handler copies uninitialized stack data into data segment
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: treilly, Unassigned)
References
Details
Attachments
(1 file)
433 bytes,
patch
|
edwsmith
:
review+
stejohns
:
feedback+
|
Details | Diff | Splinter Review |
Eventually this data finds its way into a MethodInfo, the GC scans it and valgrind flags the read there.
Interestingly only happens on 64 bit builds, release and debug.
Reporter | ||
Comment 1•14 years ago
|
||
There's gotta be a way to fix this that does away with _to_method_handler function. Apparently its only needed for MSVC (the AOT approach works everywhere but).
Attachment #475583 -
Flags: feedback?(stejohns)
Comment 2•14 years ago
|
||
Comment on attachment 475583 [details] [diff] [review]
naive fix
Seems reasonable, but use NULL instead of 0 (gcc 4.5 will complain otherwise).
Attachment #475583 -
Flags: feedback?(stejohns) → feedback+
Reporter | ||
Comment 3•14 years ago
|
||
http://hg.mozilla.org/users/treilly_adobe.com/tr-valgrind/rev/ccd6eabee566
I thought NULL too but Edwin seemed to prefer zero, I'll never understand the nuances of that debate (by choice)
Comment 4•14 years ago
|
||
Edwin prefers zero, but gcc4.5 is forcing the issue by spewing warnings if you use 0 for a pointer type
Comment 5•14 years ago
|
||
Although Edwin is technically correct he is morally in the wrong - NULL carries information to the reader, and 0 does not. (Also good compilers define NULL as something other than "0" so that NULL can't be abused in non-pointer contexts.) The absence of "nil" or a similar null-pointer idiom from C is a botch, but matters more in some decades than in others. Apparently we're on the upswing again after a decade of complacency.
Reporter | ||
Comment 6•14 years ago
|
||
Comment on attachment 475583 [details] [diff] [review]
naive fix
Couldn't think of an easy way to remove this hack so thinking we push this and create another bug to figure out how to do away with _to_method_handler?
Attachment #475583 -
Flags: superreview?
Attachment #475583 -
Flags: review?(edwsmith)
Reporter | ||
Updated•14 years ago
|
Attachment #475583 -
Flags: superreview?
Comment 7•14 years ago
|
||
Comment on attachment 475583 [details] [diff] [review]
naive fix
sounds good. Create the bug and add a "fixme: bug XXX" comment before pushing.
Attachment #475583 -
Flags: review?(edwsmith) → review+
Reporter | ||
Comment 8•14 years ago
|
||
new bug 599931
Reporter | ||
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•