[compiler-rt] d39486d - [ASAN] Remove asserts introduced in https://reviews.llvm.org/D136197

Roy Sundahl via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 17:33:45 PDT 2022


Author: Roy Sundahl
Date: 2022-10-24T17:33:40-07:00
New Revision: d39486ddd5b4159ee237a0f896c38ebfad482e97

URL: https://github.com/llvm/llvm-project/commit/d39486ddd5b4159ee237a0f896c38ebfad482e97
DIFF: https://github.com/llvm/llvm-project/commit/d39486ddd5b4159ee237a0f896c38ebfad482e97.diff

LOG: [ASAN] Remove asserts introduced in https://reviews.llvm.org/D136197

Additional calls were introduced for outlining (opposite of inlining)
in https://reviews.llvm.org/D136197 which contain asserts that partial
poisoning of a single byte wouldn't happen consecutively but this is
too strong and actually does occur in Windows. Removing those asserts
as they are unnecessary

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

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_poisoning.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_poisoning.cpp b/compiler-rt/lib/asan/asan_poisoning.cpp
index 19ae989da2b78..99ec0ee44c21f 100644
--- a/compiler-rt/lib/asan/asan_poisoning.cpp
+++ b/compiler-rt/lib/asan/asan_poisoning.cpp
@@ -13,8 +13,6 @@
 
 #include "asan_poisoning.h"
 
-#include <assert.h>
-
 #include "asan_report.h"
 #include "asan_stack.h"
 #include "sanitizer_common/sanitizer_atomic.h"
@@ -315,37 +313,30 @@ void __asan_set_shadow_00(uptr addr, uptr size) {
 }
 
 void __asan_set_shadow_01(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x01, size);
 }
 
 void __asan_set_shadow_02(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x02, size);
 }
 
 void __asan_set_shadow_03(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x03, size);
 }
 
 void __asan_set_shadow_04(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x04, size);
 }
 
 void __asan_set_shadow_05(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x05, size);
 }
 
 void __asan_set_shadow_06(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x06, size);
 }
 
 void __asan_set_shadow_07(uptr addr, uptr size) {
-  assert(size == 1);
   REAL(memset)((void *)addr, 0x07, size);
 }
 


        


More information about the llvm-commits mailing list