[LLVMdev] [asan] The default value of 'allocator_may_return_null'

Anna Zaks ganna at apple.com
Tue Mar 10 16:40:48 PDT 2015


Hi,

There seems to be a discrepancy between what the default value of 'allocator_may_return_null' should be:
  source code:
  ./lib/sanitizer_common/sanitizer_flags.inc:COMMON_FLAG(bool, allocator_may_return_null, false,

 docs (https://code.google.com/p/address-sanitizer/wiki/Flags):
allocator_may_return_null 	1 	If false, the allocator will crash instead of returning 0 on out-of-memory.

I suspect that the reason to have it default to 'false' is because that would provide for a more predictable out of memory behavior in most use cases. Is that the case or should this be system dependent and match the default system allocator?

Thanks,
Anna.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150310/dbfa8441/attachment.html>


More information about the llvm-dev mailing list