[PATCH] D31354: [tsan] Assert to make sure we don't try to Acquire() or Release() a NULL pointer
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 15:42:42 PDT 2017
kubamracek added a comment.
> What was the bug? How did it manifest?
The bug was that a GCD API (dispatch_after) was called with NULL as a queue, and our interceptors then did Acquire(NULL). This caused a segfault within MetaMap and was hard to reproduce (this was unrelated to the bug, the bug was straightforward).
Right, I can see that 0 can be valid user memory in some cases. How about defining a boolean in tsan_platform.h that simply says whether NULL is valid user memory or not? We could set it just for Linux and macOS at this point. Or are you saying that even on these systems we should support when someone explicitly mmaps something into the 0 page?
https://reviews.llvm.org/D31354
More information about the llvm-commits
mailing list