Closed
Bug 1484943
Opened 6 years ago
Closed 6 years ago
Assertion failure: !IsNaN(aValue) (NaN does not have a sign)
Categories
(Core :: JavaScript: Internationalization API, defect)
Core
JavaScript: Internationalization API
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: anba, Assigned: Waldo)
References
Details
Attachments
(1 file, 1 obsolete file)
4.57 KB,
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
Test case: --- new Intl.NumberFormat("en", {}).formatToParts(-NaN) --- Asserts with: --- Assertion failure: !IsNaN(aValue) (NaN does not have a sign), at /home/andre/hg/mozilla-inbound/js/src/build-debug-opt-obj/dist/include/mozilla/FloatingPoint.h:171 ---
Reporter | ||
Updated•6 years ago
|
Flags: needinfo?(jwalden+bmo)
Assignee | ||
Comment 1•6 years ago
|
||
Oh bah, I forgot about that. Easy and obvious fix, will rs= a landing.
Flags: needinfo?(jwalden+bmo)
Assignee | ||
Comment 2•6 years ago
|
||
Actually, wait. Something is whack here. Why should there be a sign-part in the representation of NaN, as exposed by ICU? I'll rs= a hackaround for now to fix a crash, but this looks like maybe it's an ICU issue too, and that's not going to be a simple fix.
Assignee | ||
Comment 3•6 years ago
|
||
Well, maybe on second thought a review is a good idea, since fundamentally we're working around an ICU bug and have to have comments that explain and tests that exercise this.
Attachment #9002897 -
Flags: review?(andrebargull)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Reporter | ||
Comment 4•6 years ago
|
||
Couldn't we simply canonicalise NaN before calling ICU in PartitionNumberPattern? Similar to how we changed -0.0 to +0.0 before bug 1483374.
Assignee | ||
Comment 5•6 years ago
|
||
Oh hrm, maybe. Lemme try that.
Assignee | ||
Comment 6•6 years ago
|
||
Out of the frying pan and into the fire.
Attachment #9002939 -
Flags: review?(andrebargull)
Assignee | ||
Updated•6 years ago
|
Attachment #9002897 -
Attachment is obsolete: true
Attachment #9002897 -
Flags: review?(andrebargull)
Reporter | ||
Comment 7•6 years ago
|
||
Comment on attachment 9002939 [details] [diff] [review] Patch Review of attachment 9002939 [details] [diff] [review]: ----------------------------------------------------------------- LGTM! ::: js/src/builtin/intl/NumberFormat.cpp @@ +441,5 @@ > + // formatToParts must per spec agree on the overall formatted > + // string -- and there's no guarantee that simply removing the > + // field is correct for all locales.) > + return &JSAtomState::minusSign; > + } Is this part still needed or can we now change it to an assertion?
Attachment #9002939 -
Flags: review?(andrebargull) → review+
Pushed by jwalden@mit.edu: https://hg.mozilla.org/integration/mozilla-inbound/rev/2de8069003dc Don't assert when trying to formatToParts a NaN value whose sign bit is set. r=anba
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2de8069003dc
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•