Relational operators do not handle NaN properly

VERIFIED INVALID

Status

Tamarin
Virtual Machine
VERIFIED INVALID
7 years ago
7 years ago

People

(Reporter: Brent Baker, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Bug Flags:
in-testsuite ?
flashplayer-qrb ?
flashplayer-bug -
flashplayer-triage +
flashplayer-needsversioning +

Details

(Reporter)

Description

7 years ago
According to the pre-alpha Expressions spec section 8.4.4.c (and ecma 262 s11.8.5), if either value passed into a relational operator is NaN, then "undefined" should be returned. Currently tamarin will return false.

print(12>NaN): // false, should return undefined
print(12<NaN): // false, should return undefined
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-needsversioning+
Flags: flashplayer-bug-
(Reporter)

Updated

7 years ago
See Also: → bug 640052
(Reporter)

Comment 1

7 years ago
I should have continued reading the specification. In the abstract relational comparison algorithm, undefined is returned if one of the values is NaN, however each of the concrete relational comparison operators will return false if the call to the abstract algorithm returns undefined. Retracting bug.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
(Reporter)

Updated

7 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.