Skip to content

Commit a8591e2

Browse files
committed
extend test
1 parent 5f7cf84 commit a8591e2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ int main(void) {
3030
if (_aligned_msize(p, 128, 0) != 2048 * sizeof(int))
3131
return __LINE__;
3232
_aligned_free(p);
33+
34+
char *y = (char *)malloc(1024);
35+
char *u = (char *)realloc(y, 2048);
36+
u[0] = 'a';
37+
_aligned_free(u);
38+
u = (char *)_aligned_offset_malloc(1024, 8, 2);
39+
_aligned_free(u);
40+
3341
char *t = (char *)_aligned_malloc(128, 8);
3442
t[-1] = 'a';
3543
// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]

0 commit comments

Comments
 (0)