[PATCH] D35275: [Sanitizers] ASan/MSan/LSan allocators set errno on failure.
    Aleksey Shlyapnikov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul 12 16:02:31 PDT 2017
    
    
  
alekseyshl added a comment.
In https://reviews.llvm.org/D35275#805965, @cryptoad wrote:
> Instead of the ptr_check calls, couldn't errno be set to ENOMEM in ReturnNullOrDieOnFailure::OnOOM? Unless mistaken it should be the common function to the return nullptr scenario on OOM.
>  Also you are going to hate me, and I apologize in advance, but when starting Scudo I was asked to follow to LLVM casing scheme, which your additions to Scudo don't comply with :/
Will change Scudo part to follow your scheme, no problem.
No, unfortunately, I cannot set errno in the policy, posix_memalign does not affect errno and errno is an API concept anyway, I'd like to keep allocator internals oblivious to it.
https://reviews.llvm.org/D35275
    
    
More information about the llvm-commits
mailing list