WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
292617
[WTF] Use `std::trunc` in `isIntegral` function for Correct Integral Check instead of `static_cast<int>`
https://bugs.webkit.org/show_bug.cgi?id=292617
Summary
[WTF] Use `std::trunc` in `isIntegral` function for Correct Integral Check in...
Keita Nonaka
Reported
2025-05-06 10:02:55 PDT
`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
Comment 1
2025-05-06 10:04:34 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/45011
EWS
Comment 2
2025-05-06 20:36:45 PDT
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
Comment 3
2025-05-06 20:37:13 PDT
<
rdar://problem/150821497
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug