Commit 6dfd8d0
authored
[asan] Rewrite Windows/heaprealloc_alloc_zero check to avoid dereference (#156211)
The test currently checks that 1-byte is allocated when malloc(0) is
called, by dereferencing the pointer.
#155943 changed ASan to
consider the dereference to be a heap buffer overflow. This patch
changes the test to check the allocated size is still 1-byte, but not
dereference the pointer.
This aims to fix the breakage reported in
#155943 (comment)
It also enables the test for 64-bit Windows.1 parent 2824b3c commit 6dfd8d0
File tree
1 file changed
+7
-2
lines changed- compiler-rt/test/asan/TestCases/Windows
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
0 commit comments