Commit db82db1b authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Commit Bot

Fix cfi-icall failure with use_system_libjpeg=true

JPEGImageReader::AllocateSampleArray() can call the function pointer
(*info_.mem->alloc_sarray) which can be set by the systems non-CFI
enabled libjpeg DSO when chromium is built with use_system_libjpeg=true.
Disable cfi-icall for that method.

Bug: 866290
Change-Id: I6d9bbf08c514d6d5f48ad34c3802c63419ed1223
Reviewed-on: https://chromium-review.googlesource.com/1155927Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579270}
parent b3b60e7a
......@@ -643,7 +643,7 @@ class JPEGImageReader final {
IntSize UvSize() const { return uv_size_; }
private:
JSAMPARRAY AllocateSampleArray() {
NO_SANITIZE_CFI_ICALL JSAMPARRAY AllocateSampleArray() {
// Some output color spaces don't need the sample array: don't allocate in that
// case.
#if defined(TURBO_JPEG_RGB_SWIZZLE)
......
......@@ -57,8 +57,10 @@
#if defined(__clang__)
#define NO_SANITIZE_UNRELATED_CAST \
__attribute__((no_sanitize("cfi-unrelated-cast", "vptr")))
#define NO_SANITIZE_CFI_ICALL __attribute__((no_sanitize("cfi-icall")))
#else
#define NO_SANITIZE_UNRELATED_CAST
#define NO_SANITIZE_CFI_ICALL
#endif
#endif /* WTF_Compiler_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment