[webkit-reviews] review denied: [Bug 236001] ASAN false positive stack-buffer-underflow bmalloc_allocate_impl_casual_case : [Attachment 450613] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 2 15:33:21 PST 2022


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has denied Kimmo Kinnunen
<kkinnunen at apple.com>'s request for review:
Bug 236001: ASAN false positive stack-buffer-underflow
bmalloc_allocate_impl_casual_case
https://bugs.webkit.org/show_bug.cgi?id=236001

Attachment 450613: Patch

https://bugs.webkit.org/attachment.cgi?id=450613&action=review




--- Comment #6 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 450613
  --> https://bugs.webkit.org/attachment.cgi?id=450613
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450613&action=review

>> Source/bmalloc/Configurations/bmalloc.xcconfig:36
>> +BMALLOC_ADDRESS_SANITIZER_OTHER_CFLAGS_YES =
-fno-sanitize-address-use-after-scope;
> 
> This will turn it off for all ASan builds on older clang versions, not just
the affected versions of clang.
> 
> We should figure out how to only enable this on given versions of Xcode or
the SDK.  Just need to find an example of how to do this in other xcconfig
files.
> 
> (I’m not actually awake. :)

Modeling this after the `WK_XCODE_SUPPORTS_LTO` variables in
Source/bmalloc/Configurations/Base.xcconfig should work here.  Something like
this:

OTHER_CFLAGS = $(inherited) $(BMALLOC_ADDRESS_SANITIZER_OTHER_CFLAGS);

// Workaround a false positive
<https://bugs.webkit.org/show_bug.cgi?id=236001>.
BMALLOC_ADDRESS_SANITIZER_OTHER_CFLAGS =
$(BMALLOC_ADDRESS_SANITIZER_OTHER_CFLAGS_$(WK_WORKAROUND_ASAN_USE_AFTER_SCOPE))
;
BMALLOC_ADDRESS_SANITIZER_OTHER_CFLAGS_YES =
-fno-sanitize-address-use-after-scope;

WK_WORKAROUND_ASAN_USE_AFTER_SCOPE =
$(WK_NOT_$(WK_XCODE_VERSION_BEFORE_13_3_$(XCODE_VERSION_MAJOR)));

WK_XCODE_VERSION_BEFORE_13_3_0800 = YES;
WK_XCODE_VERSION_BEFORE_13_3_0900 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1000 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1100 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1200 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1300 =
$(WK_XCODE_VERSION_BEFORE_13_3_1300_$(XCODE_VERSION_MINOR));
WK_XCODE_VERSION_BEFORE_13_3_1300_1300 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1300_1310 = YES;
WK_XCODE_VERSION_BEFORE_13_3_1300_1320 = YES;


More information about the webkit-reviews mailing list