[Webkit-unassigned] [Bug 199650] New: Keyword lookup can use memcmp to get around unaligned load undefined behavior
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 9 18:22:00 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=199650
Bug ID: 199650
Summary: Keyword lookup can use memcmp to get around unaligned
load undefined behavior
Product: WebKit
Version: WebKit Local Build
Hardware: Macintosh
OS: Other
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: saagarjha at apple.com
KeywordLookup.h rolls what appears to be its own custom memcmp to do string matches, but it performs unaligned loads, reinterpret_casts, and in general makes UBSan very unhappy. I think we can use just use memcmp instead (someone should check whether I can do this, though: I may be misunderstanding how the character encoding works). I have checked that Clang and GCC produce reasonable-looking assembly for this if we make what we're doing clear enough.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190710/184f7474/attachment-0001.html>
More information about the webkit-unassigned
mailing list