Closed
Bug 351871
Opened 18 years ago
Closed 7 years ago
NativeData2JS does not handle unsigned 64 bit correctly
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: jhpedemonte, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Due to the definition of JAM_DOUBLE_U64 (http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/src/xpcconvert.cpp#176) in xpcconvert.cpp, unsigned 64 bit values are treated as signed values, which leads to incorrect values for large unsigned 64 bit numbers. It seems like the correct thing to do is to use LL_L2D, as is done in the #else block for the code.
Reporter | ||
Comment 1•18 years ago
|
||
Something like this. The comment for JAM_DOUBLE_U64 says that "Win32 can't handle uint64 to double conversion", but this worked just fine for me on WinXP. Maybe older Win32 systems?
Attachment #237375 -
Flags: review?(shaver)
Reporter | ||
Comment 2•18 years ago
|
||
Comment on attachment 237375 [details] [diff] [review]
patch
Nope, this patch is wrong; my testcase was incorrect. Unsigned still treated as signed.
Attachment #237375 -
Attachment is obsolete: true
Attachment #237375 -
Flags: review?(shaver)
Reporter | ||
Comment 3•18 years ago
|
||
This is better. However, I haven't tested this on a Win32 machine.
Updated•18 years ago
|
Assignee: dbradley → nobody
Comment 4•7 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•