[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
Loading
Please sign in to comment