Skip to content

Commit c27415f

Browse files
committed
[sanitizer,test] Restore -fno-sized-deallocation coverage
-fsized-deallocation was recently made the default for C++17 onwards (#90373). While here, remove unneeded -faligned-allocation.
1 parent 496b224 commit c27415f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler-rt/test/asan/TestCases/Linux/aligned_delete_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clangxx_asan -std=c++1z -faligned-allocation -fsanitize-recover=address -O0 %s -o %t
1+
// RUN: %clangxx_asan -fno-sized-deallocation -fsanitize-recover=address -O0 %s -o %t
22
// RUN: %env_asan_opts=new_delete_type_mismatch=1:halt_on_error=false:detect_leaks=false %run %t 2>&1 | FileCheck %s
33
// RUN: %env_asan_opts=new_delete_type_mismatch=0 %run %t
44

5-
// RUN: %clangxx_asan -std=c++1z -faligned-allocation -fsized-deallocation -fsanitize-recover=address -O0 %s -o %t
5+
// RUN: %clangxx_asan -fsized-deallocation -fsanitize-recover=address -O0 %s -o %t
66
// RUN: %env_asan_opts=new_delete_type_mismatch=1:halt_on_error=false:detect_leaks=false %run %t 2>&1 | FileCheck %s
77
// RUN: %env_asan_opts=new_delete_type_mismatch=0 %run %t
88

compiler-rt/test/asan/TestCases/Linux/new_delete_mismatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that we report new[] vs delete as alloc-dealloc-mismatch and not as
22
// new-delete-type-mismatch when -fsized-deallocation is enabled.
33

4-
// RUN: %clangxx_asan -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
4+
// RUN: %clangxx_asan -fno-sized-deallocation -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
55
// RUN: %clangxx_asan -fsized-deallocation -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
66

77
#include <stdlib.h>

compiler-rt/test/hwasan/TestCases/new-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Test basic new functionality.
2-
// RUN: %clangxx_hwasan -std=c++17 %s -o %t -fsized-deallocation
2+
// RUN: %clangxx_hwasan -std=c++17 %s -o %t
33
// RUN: %run %t
44

55
#include <cassert>

compiler-rt/test/sanitizer_common/TestCases/Linux/new_delete_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -std=c++1z -faligned-allocation -O0 %s -o %t && %run %t
2-
// RUN: %clangxx -std=c++1z -faligned-allocation -fsized-deallocation -O0 %s -o %t && %run %t
1+
// RUN: %clangxx -fno-sized-deallocation -O0 %s -o %t && %run %t
2+
// RUN: %clangxx -fsized-deallocation -O0 %s -o %t && %run %t
33

44
// ubsan does not intercept new/delete.
55
// UNSUPPORTED: ubsan

compiler-rt/test/scudo/aligned-new.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx_scudo -std=c++1z -faligned-allocation %s -o %t
1+
// RUN: %clangxx_scudo %s -o %t
22
// RUN: %run %t valid 2>&1
33
// RUN: %env_scudo_opts=allocator_may_return_null=1 %run %t invalid 2>&1
44
// RUN: %env_scudo_opts=allocator_may_return_null=0 not %run %t invalid 2>&1 | FileCheck %s

0 commit comments

Comments
 (0)