Incorrect result for -x === x on 64-bit

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
--
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.
(Assignee)

Comment 1

6 years ago
(In reply to comment #0)
> 32-bit build: false
> 64-bit build: true

Oops, 32-bit is true and 64-bit false.
(Assignee)

Comment 2

6 years ago
StrictlyEqual calls SameType and this returns false, even though lval.isDouble() and rval.isDouble() are both true. Could this be a fatvals regression?
(Assignee)

Updated

6 years ago
Assignee: general → jandemooij
Status: NEW → ASSIGNED
(Assignee)

Comment 3

6 years ago
Created attachment 527737 [details] [diff] [review]
Patch
Attachment #527737 - Flags: review?(luke)
(Assignee)

Updated

6 years ago
Blocks: 549143
(Assignee)

Comment 4

6 years ago
Created attachment 527770 [details] [diff] [review]
Patch

Added some tests for ==/!=.
Attachment #527737 - Attachment is obsolete: true
Attachment #527737 - Flags: review?(luke)
Attachment #527770 - Flags: review?(luke)

Comment 5

6 years ago
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!
Attachment #527770 - Flags: review?(luke) → review+
(Assignee)

Comment 6

6 years ago
http://hg.mozilla.org/tracemonkey/rev/3586947613e0
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/3586947613e0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.