[PATCH] D89827: hwasan: Disable operator {new,delete} interceptors when interceptors are disabled.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 14:37:17 PDT 2020


pcc created this revision.
pcc added a reviewer: eugenis.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
pcc requested review of this revision.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89827

Files:
  compiler-rt/lib/hwasan/hwasan.h


Index: compiler-rt/lib/hwasan/hwasan.h
===================================================================
--- compiler-rt/lib/hwasan/hwasan.h
+++ compiler-rt/lib/hwasan/hwasan.h
@@ -21,10 +21,6 @@
 #include "hwasan_flags.h"
 #include "ubsan/ubsan_platform.h"
 
-#ifndef HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE
-# define HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE 1
-#endif
-
 #ifndef HWASAN_CONTAINS_UBSAN
 # define HWASAN_CONTAINS_UBSAN CAN_SANITIZE_UB
 #endif
@@ -33,6 +29,10 @@
 #define HWASAN_WITH_INTERCEPTORS 0
 #endif
 
+#ifndef HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE
+#define HWASAN_REPLACE_OPERATORS_NEW_AND_DELETE HWASAN_WITH_INTERCEPTORS
+#endif
+
 typedef u8 tag_t;
 
 // TBI (Top Byte Ignore) feature of AArch64: bits [63:56] are ignored in address


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89827.299480.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201020/f53120cb/attachment.bin>


More information about the llvm-commits mailing list