Bug 223663 - Address undefined behavior found by UBSan in DateMath.h
Summary: Address undefined behavior found by UBSan in DateMath.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-23 17:00 PDT by Chris Dumez
Modified: 2021-03-24 10:32 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.20 KB, patch)
2021-03-23 17:04 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-03-23 17:00:38 PDT
Address undefined behavior found in UBSan in DateMath.h:
Release/usr/local/include/wtf/DateMath.h:247:39: runtime error: nan is outside the range of representable values of type 'int'
Release/usr/local/include/wtf/DateMath.h:221:29: runtime error: nan is outside the range of representable values of type 'int'
Release/usr/local/include/wtf/DateMath.h:165:38: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Comment 1 Chris Dumez 2021-03-23 17:04:11 PDT
Created attachment 424078 [details]
Patch
Comment 2 EWS 2021-03-24 10:31:32 PDT
Committed r274946: <https://commits.webkit.org/r274946>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424078 [details].
Comment 3 Radar WebKit Bug Importer 2021-03-24 10:32:17 PDT
<rdar://problem/75791894>