[PATCH] D94210: [ASan] Stop blocking child thread progress from parent thread in `pthread_create` interceptor.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 6 18:29:33 PST 2021
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/asan/asan_interceptors.cpp:220
+ //
+ // We set a flag to tell the child thread if it should unignore the object.
+ // We should not try to unignore the object if `kIgnoreObjectAlreadyIgnored`
----------------
vitalybuka wrote:
> probably too artificial but looks like will be broken
>
> ```
> p = new char;
> pthread_create(... p)
> delete p; // we know that thread is not going to use it
> ...
>
> p = new char; // unrelated allocation
> Ingore(p)
> ```
>
> could be simple and more reliable to change leak sanitizer to walk through all alive threads and include thread->arg_ into frontier?
more practical
```
shared = new char;
pthread_create(... shared)
pthread_create(... shared)
```
if the first thread unignores and exists and the second thread are not yet started we may see false leak.
should be fine with proposed lsan change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94210/new/
https://reviews.llvm.org/D94210
More information about the llvm-commits
mailing list