diff options
author | Kostya Serebryany <kcc@google.com> | 2013-09-06 09:25:11 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-09-06 09:25:11 +0000 |
commit | 9150f397ba4c5478275d72665ea3e53a84c7076a (patch) | |
tree | 30352c659126691fa2426a4158f06cc20a878f1f /lib/sanitizer_common/sanitizer_flags.h | |
parent | a27512c4e115df4f260501a94b8d343f9ed955af (diff) |
[sanitizer] make the allocator crash instead of returning 0 on huge size (controlled by the allocator_may_return_null flag)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h index d1a2961b6..43632e65c 100644 --- a/lib/sanitizer_common/sanitizer_flags.h +++ b/lib/sanitizer_common/sanitizer_flags.h @@ -45,6 +45,8 @@ struct CommonFlags { // detect_leaks=false, or if __lsan_do_leak_check() is called before the // handler has a chance to run. bool leak_check_at_exit; + // If false, the allocator will crash instead of returning 0 on out-of-memory. + bool allocator_may_return_null; }; extern CommonFlags common_flags_dont_use_directly; |