Bug 223663

Summary: Address undefined behavior found by UBSan in DateMath.h
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, darin, ews-watchlist, ggaren, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=176131
Attachments:
Description Flags
Patch none

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>