[ASAN] Remove asserts introduced in https://reviews.llvm.org/D136197
authorRoy Sundahl <rsundahl@apple.com>
Mon, 24 Oct 2022 23:01:40 +0000 (16:01 -0700)
committerRoy Sundahl <rsundahl@apple.com>
Tue, 25 Oct 2022 00:33:40 +0000 (17:33 -0700)
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

compiler-rt/lib/asan/asan_poisoning.cpp

index 19ae989da2b78083a011e0aa3e7cd22fd41a53dd..99ec0ee44c21f51c9a90cf80f523785aae27df81 100644 (file)
@@ -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);
 }