[compiler-rt] [ASan] Honor `allocator_may_return_null` when set through user-function and fix large alloc edge case (PR #117929)
David Justo via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 09:37:49 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
----------------
davidmrdavid wrote:
Whoops, I had meant to set that to `0` and have the user function actually override that `0` to `1`.
But might as well remove it. Done that here: https://github.com/llvm/llvm-project/pull/117929/commits/1f66929b1991827bdd068bd5b8f2c1afe72b129e
https://github.com/llvm/llvm-project/pull/117929
More information about the llvm-commits
mailing list