Skip to content

Commit b20ef09

Browse files
Roy Sundahlthetruestblue
authored andcommitted
[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
1 parent ace1d6d commit b20ef09

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler-rt/lib/asan/asan_poisoning.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
#include "asan_poisoning.h"
1515

16-
#include <assert.h>
17-
1816
#include "asan_report.h"
1917
#include "asan_stack.h"
2018
#include "sanitizer_common/sanitizer_atomic.h"
@@ -315,37 +313,30 @@ void __asan_set_shadow_00(uptr addr, uptr size) {
315313
}
316314

317315
void __asan_set_shadow_01(uptr addr, uptr size) {
318-
assert(size == 1);
319316
REAL(memset)((void *)addr, 0x01, size);
320317
}
321318

322319
void __asan_set_shadow_02(uptr addr, uptr size) {
323-
assert(size == 1);
324320
REAL(memset)((void *)addr, 0x02, size);
325321
}
326322

327323
void __asan_set_shadow_03(uptr addr, uptr size) {
328-
assert(size == 1);
329324
REAL(memset)((void *)addr, 0x03, size);
330325
}
331326

332327
void __asan_set_shadow_04(uptr addr, uptr size) {
333-
assert(size == 1);
334328
REAL(memset)((void *)addr, 0x04, size);
335329
}
336330

337331
void __asan_set_shadow_05(uptr addr, uptr size) {
338-
assert(size == 1);
339332
REAL(memset)((void *)addr, 0x05, size);
340333
}
341334

342335
void __asan_set_shadow_06(uptr addr, uptr size) {
343-
assert(size == 1);
344336
REAL(memset)((void *)addr, 0x06, size);
345337
}
346338

347339
void __asan_set_shadow_07(uptr addr, uptr size) {
348-
assert(size == 1);
349340
REAL(memset)((void *)addr, 0x07, size);
350341
}
351342

0 commit comments

Comments
 (0)