[compiler-rt] 11c8b9c - [hwasan] Re-enable the test with fallback

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 22:38:55 PDT 2023


Author: Vitaly Buka
Date: 2023-09-11T22:38:39-07:00
New Revision: 11c8b9c907f2744e6af2456928649523b21da02f

URL: https://github.com/llvm/llvm-project/commit/11c8b9c907f2744e6af2456928649523b21da02f
DIFF: https://github.com/llvm/llvm-project/commit/11c8b9c907f2744e6af2456928649523b21da02f.diff

LOG: [hwasan] Re-enable the test with fallback

The test passes without stdc++, but we prefer to run it with stdc++ if
availibe.

Added: 
    

Modified: 
    compiler-rt/test/hwasan/TestCases/sizes.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/hwasan/TestCases/sizes.cpp b/compiler-rt/test/hwasan/TestCases/sizes.cpp
index 9f289539a773c3e..ce2c4579d66f612 100644
--- a/compiler-rt/test/hwasan/TestCases/sizes.cpp
+++ b/compiler-rt/test/hwasan/TestCases/sizes.cpp
@@ -1,6 +1,6 @@
 // This test requires operator new to be intercepted by the hwasan runtime,
 // so we need to avoid linking against libc++.
-// RUN: %clangxx_hwasan %s -nostdlib++ -lstdc++ -o %t
+// RUN: %clangxx_hwasan %s -nostdlib++ -lstdc++ -o %t || %clangxx_hwasan %s -o %t
 // RUN: %env_hwasan_opts=allocator_may_return_null=0 not %run %t malloc 2>&1          | FileCheck %s --check-prefix=CHECK-max
 // RUN: %env_hwasan_opts=allocator_may_return_null=1     %run %t malloc 2>&1
 // RUN: %env_hwasan_opts=allocator_may_return_null=0 not %run %t malloc max 2>&1      | FileCheck %s --check-prefix=CHECK-max
@@ -23,9 +23,6 @@
 // allocator can allocate. Tests that an integer overflow in the parameters of
 // calloc is caught.
 
-// FIXME: Fails on some bots.
-// UNSUPPORTED: target={{.*}}
-
 #include <assert.h>
 #include <malloc.h>
 #include <stdlib.h>


        


More information about the llvm-commits mailing list