Closed
Bug 442086
Opened 16 years ago
Closed 16 years ago
XPConnect creates doubles without checking for the INT_FITS_IN_JSVAL case
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
Attachments
(2 files)
423 bytes,
text/html
|
Details | |
7.67 KB,
patch
|
jst
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
See bug 435288. The bug is in xpcconvert.cpp, in the definition of JAM_DOUBLE and the places where it's used. http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpcconvert.cpp#174 The actual symptom: If a value produced this way is used in certain JS switch statements, it can incorrectly fail to match any cases. (This code also fails to report out-of-memory errors. Should I bother fixing that?)
Assignee | ||
Comment 1•16 years ago
|
||
You can actually get to this bug via the DOM.
Assignee | ||
Comment 2•16 years ago
|
||
This fixes the bug ...and makes it return JS_FALSE on out of memory. An xpconnect unit test is included. Did I put that in the right place? I took out a comment that said, "XXX will this break backwards compatability???" The comment had been there since 2001, so I figure we're good. The "Support for 64 bit conversions where 'long long' not supported" had to be touched. As I don't even know what those platforms might be, the new code is untested.
Assignee | ||
Updated•16 years ago
|
Attachment #327247 -
Flags: review? → review?(shaver)
Assignee | ||
Updated•16 years ago
|
Attachment #327247 -
Flags: review?(shaver) → review?(jst)
Assignee | ||
Comment 3•16 years ago
|
||
I ran this through the try server and everything came up green. (2008/07/16 22:28:02)
Comment 4•16 years ago
|
||
Comment on attachment 327247 [details] [diff] [review] v1 Looks good, it'd be good if Brendan could have a look at this one too.
Attachment #327247 -
Flags: superreview?(brendan)
Attachment #327247 -
Flags: review?(jst)
Attachment #327247 -
Flags: review+
Comment 5•16 years ago
|
||
Comment on attachment 327247 [details] [diff] [review] v1 >+/* >+* Support for 64 bit conversions where 'long long' not supported. >+* (from John Fairhurst <mjf35@cam.ac.uk>) >+*/ May as well fix comment style since it is moving enough not to show blame directly. sr=me, although I think jst can r+sr with impunity ;-). /be
Attachment #327247 -
Flags: superreview?(brendan) → superreview+
Assignee | ||
Comment 6•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c898e650581d
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•