Skip to content
Unverified Commit fcf92cb8 authored by Jin Xin Ng's avatar Jin Xin Ng
Browse files

[tsan] Check for nullptr on user_alloc_usable_size_fast

MBlock could be null (in the context of a call from RunFreeHooks)
if a static object was runtime initialized before tsan finished
initializing and that object later did a free().

While having the check isn't strictly required by
__sanitizer_get_allocated_size_fast's contract, a user's static object
would expect ptrs returned from malloc to be valid inputs.

Differential Revision: https://reviews.llvm.org/D152755
parent c4e60a7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment