Last Comment Bug 652060 - Incorrect result for -x === x on 64-bit
: Incorrect result for -x === x on 64-bit
Status: RESOLVED FIXED
fixed-in-tracemonkey
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Jan de Mooij [:jandem] (PTO until July 31)
:
Mentors:
Depends on:
Blocks: fatvals
  Show dependency treegraph
 
Reported: 2011-04-22 00:31 PDT by Jan de Mooij [:jandem] (PTO until July 31)
Modified: 2011-04-26 15:12 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.21 KB, patch)
2011-04-22 01:19 PDT, Jan de Mooij [:jandem] (PTO until July 31)
no flags Details | Diff | Splinter Review
Patch (1.29 KB, patch)
2011-04-22 08:06 PDT, Jan de Mooij [:jandem] (PTO until July 31)
luke: review+
Details | Diff | Splinter Review

Description Jan de Mooij [:jandem] (PTO until July 31) 2011-04-22 00:31:36 PDT
--
var x = -false;
print(-x === x);
--
32-bit build: false
64-bit build: true

Does not need any jitflags. Noticed this first in the shell but can reproduce with latest tinderbox build.
Comment 1 Jan de Mooij [:jandem] (PTO until July 31) 2011-04-22 00:33:09 PDT
(In reply to comment #0)
> 32-bit build: false
> 64-bit build: true

Oops, 32-bit is true and 64-bit false.
Comment 2 Jan de Mooij [:jandem] (PTO until July 31) 2011-04-22 00:51:04 PDT
StrictlyEqual calls SameType and this returns false, even though lval.isDouble() and rval.isDouble() are both true. Could this be a fatvals regression?
Comment 3 Jan de Mooij [:jandem] (PTO until July 31) 2011-04-22 01:19:40 PDT
Created attachment 527737 [details] [diff] [review]
Patch
Comment 4 Jan de Mooij [:jandem] (PTO until July 31) 2011-04-22 08:06:39 PDT
Created attachment 527770 [details] [diff] [review]
Patch

Added some tests for ==/!=.
Comment 5 Luke Wagner [:luke] 2011-04-22 09:50:15 PDT
Comment on attachment 527770 [details] [diff] [review]
Patch

Wow, that's incredible that this made it so far without being detected.  Thanks for fixing it!
Comment 6 Jan de Mooij [:jandem] (PTO until July 31) 2011-04-23 00:59:40 PDT
http://hg.mozilla.org/tracemonkey/rev/3586947613e0
Comment 7 Chris Leary [:cdleary] (not checking bugmail) 2011-04-26 15:12:47 PDT
http://hg.mozilla.org/mozilla-central/rev/3586947613e0

Note You need to log in before you can comment on or make changes to this bug.