Reland "hwasan: Disable operator {new,delete} interceptors when interceptors are...
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 20 Oct 2020 21:36:34 +0000 (14:36 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 28 Oct 2020 22:42:23 +0000 (15:42 -0700)
There was a discrepancy in the gn build which is now fixed.

Differential Revision: https://reviews.llvm.org/D89827

compiler-rt/lib/hwasan/hwasan.h

index b8b7a18..d4521ef 100644 (file)
 #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
 #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