[compiler-rt] e2a8b98 - [asan] Change zero_alloc.cpp testcase to use stdlib.h, re-enable on Mac (#156490)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 12:48:35 PDT 2025


Author: Thurston Dang
Date: 2025-09-02T12:48:31-07:00
New Revision: e2a8b9862c09acb5ae065718bbd73485da21172b

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

LOG: [asan] Change zero_alloc.cpp testcase to use stdlib.h, re-enable on Mac (#156490)

Avoid build breakage on Mac (reported at
https://github.com/llvm/llvm-project/pull/155943#issuecomment-3244593484)

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/zero_alloc.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/zero_alloc.cpp b/compiler-rt/test/asan/TestCases/zero_alloc.cpp
index 1cd00732a48e5..aa807f44ed3b3 100644
--- a/compiler-rt/test/asan/TestCases/zero_alloc.cpp
+++ b/compiler-rt/test/asan/TestCases/zero_alloc.cpp
@@ -1,10 +1,7 @@
 // RUN: %clang_asan -Wno-alloc-size -fsanitize-recover=address %s -o %t && %env_asan_opts=halt_on_error=0 %run %t 2>&1 | FileCheck %s
 
-// UNSUPPORTED: darwin
-// UNSUPPORTED: ios
-
-#include <malloc.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 int main(int argc, char **argv) {
   {


        


More information about the llvm-commits mailing list