| Summary: | Make ASan do bounds checks for WTF::Vector | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||
| Component: | Web Template Framework | Assignee: | Alexey Proskuryakov <ap> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | andersca, benjamin, cmarcelo, commit-queue, darin, ggaren | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Alexey Proskuryakov
2015-01-19 11:44:11 PST
Created attachment 244913 [details]
proposed patch
Attachment 244913 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/Vector.h:510: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 1 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 244913 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=244913&action=review Do you know why the Win EWS bot is red on this patch? > Source/WTF/wtf/Vector.h:756 > + if (this == &other) // ASan will crash if we try to restrict access to the same buffer twice. > + return; It’s irritating to add this extra branch for all builds just to make ASAN work, especially since it only optimizes something that we should never be doing. Can we do better? Maybe just put this inside #if ASAN_ENABLED? I don't yet understand why Windows failed to build; will need to figure it out before landing.
> Maybe just put this inside #if ASAN_ENABLED?
Will do.
Committed <http://trac.webkit.org/r178722>. Windows build was failing because of an incorrect macro value. Changed ASAN_ENABLED fallback value from false to 0 to fix this. |