RESOLVED FIXED 141258
Optimized equal() functions in StringImpl.h are not ASan compatible
https://bugs.webkit.org/show_bug.cgi?id=141258
Summary Optimized equal() functions in StringImpl.h are not ASan compatible
Alexey Proskuryakov
Reported 2015-02-04 12:58:50 PST
equal() reads out of bounds; we started seeing this after the fix for bug 140873.
Attachments
proposed fix (2.58 KB, patch)
2015-02-04 13:55 PST, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2015-02-04 13:55:12 PST
Created attachment 246045 [details] proposed fix
Daniel Bates
Comment 2 2015-02-04 14:43:17 PST
Comment on attachment 246045 [details] proposed fix View in context: https://bugs.webkit.org/attachment.cgi?id=246045&action=review > Source/WTF/wtf/text/StringImpl.h:878 > +#if (CPU(X86_64) || CPU(ARM64)) && !ASAN_ENABLED You may want to consider checking ASAN_ENABLED in an if-statement and changing the #if to #elif on this line such that these #if/elif/else-macro blocks look like: #if ASAN_ENABLED ... #elif CPU(X86_64) || CPU(ARM64) ... ... #else ... #endif Then we do not need to add the conjunct !ASAN_ENABLED to each macro conditional expression.
Alexey Proskuryakov
Comment 3 2015-02-04 14:57:32 PST
Comment on attachment 246045 [details] proposed fix I wanted to keep debug-only code after production code - we usually try to keep the "best" variant first in WebKit code base.
WebKit Commit Bot
Comment 4 2015-02-04 15:38:47 PST
Comment on attachment 246045 [details] proposed fix Clearing flags on attachment: 246045 Committed r179644: <http://trac.webkit.org/changeset/179644>
WebKit Commit Bot
Comment 5 2015-02-04 15:38:51 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.