[compiler-rt] [ASan] Honor `allocator_may_return_null` when set through user-function and fix large alloc edge case (PR #117929)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 00:49:58 PST 2024
================
@@ -0,0 +1,34 @@
+// RUN: %clangxx_asan -O0 %s -o %t
+// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ABORT
+// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RETURN_NULL
+
+// RUN: %clangxx_asan -O0 %s -o %t -DUSER_FUNCTION
+// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RETURN_NULL
----------------
zmodem wrote:
The `%env_asan_opts=allocator_may_return_null=1` part seems redundant here, and defeating the purpose of defining `__asan_default_options`.
https://github.com/llvm/llvm-project/pull/117929
More information about the llvm-commits
mailing list