RESOLVED FIXED 223581
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2681:9: runtime error: load of value nnn, which is not a valid value for type 'BOOL' (aka 'signed char')
https://bugs.webkit.org/show_bug.cgi?id=223581
Summary Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2681:9: runtime error: load of v...
Chris Dumez
Reported 2021-03-22 09:18:26 PDT
Fix bug found by UBSAN in WebViewImpl::pluginFocusOrWindowFocusChanged().
Attachments
Patch (1.93 KB, patch)
2021-03-22 09:22 PDT, Chris Dumez
no flags
Patch (1.93 KB, patch)
2021-03-22 10:03 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-03-22 09:22:35 PDT
Chris Dumez
Comment 2 2021-03-22 10:03:49 PDT
EWS
Comment 3 2021-03-22 13:15:10 PDT
Committed r274786: <https://commits.webkit.org/r274786> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423902 [details].
Radar WebKit Bug Importer
Comment 4 2021-03-22 13:16:17 PDT
Darin Adler
Comment 5 2021-03-22 15:23:34 PDT
Comment on attachment 423902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423902&action=review > Source/WebKit/ChangeLog:10 > + The code was implicitly casting an uint64_t identifier into a BOOL variable. The intention was > + to check whether the identifier is 0 or not. To silence the UBSAN error, we now use the bool > + type instead of BOOL (since BOOL is defined as a signed char on some platforms). On platforms where BOOL is signed char, the original code will work wrong any time the low 8 bits of the pointer are zero! I feel like we are concentrating too much on "placating" UBSan and too little on fixing the bug UBSan found in our commentary.
Note You need to log in before you can comment on or make changes to this bug.