Bug 251117
Summary: | DFG should not speculate Int32 for NaN constants | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Degazio <d_degazio> |
Component: | JavaScriptCore | Assignee: | David Degazio <d_degazio> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
David Degazio
rdar://104608391
Currently, DFG will attempt to speculate Int32 for certain double constants during the fixup phase. If a number constant is an Int32, or falls within a valid range (between ±2^48), it's allowed to be truncated into an integer. However, NaN values cannot be compared and ordered, so unlike other non-finite values like positive or negative Infinity, they can pass this range check and be converted into an Int32 despite clearly being non-integral values. We should add a check for NaN constants and reject Int32 speculation if we come across one during the fixup phase.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/9077
EWS
Committed 259340@main (800a9bf27aa7): <https://commits.webkit.org/259340@main>
Reviewed commits have been landed. Closing PR #9077 and removing active labels.