Commit cb5e1f2
committed
[asan] Rewrite Windows/heaprealloc_alloc_zero check to avoid dereference
The test checks that 1-byte is allocated when malloc(0) is called, by
dereferencing the pointer.
llvm#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 llvm#155943 (comment)1 parent 2824b3c commit cb5e1f2
File tree
1 file changed
+7
-1
lines changed- compiler-rt/test/asan/TestCases/Windows
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
0 commit comments