Bug 292617
| Summary: | [WTF] Use `std::trunc` in `isIntegral` function for Correct Integral Check instead of `static_cast<int>` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Keita Nonaka <iKonnyaku40> |
| Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Keita Nonaka
`static_cast<int>` does not cover the entire range of float, such as `3.4e38f`.
In order to avoid the potential bug, use `std::trunc` instead of `static_cast<int>` for more reliable check.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Keita Nonaka
Pull request: https://github.com/WebKit/WebKit/pull/45011
EWS
Committed 294596@main (3b0ec9763829): <https://commits.webkit.org/294596@main>
Reviewed commits have been landed. Closing PR #45011 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/150821497>