[compiler-rt] [sanitizer] Fix asserts in asan and tsan in pthread interceptors. (PR #75394)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 16:06:27 PST 2023


vitalybuka wrote:

@dvyukov had strong opinion on that.
I would probably prefer sanitizer crash with report with explanation.
But I don't like silently return error here as well.

>From pthread_detach manual
```
       Attempting to detach an already detached thread results in
       unspecified behavior.
```

There is no promise to return particular error on the second detach. User code should not do that.

However sanitizers can get into inconsistent state, which will be hard to debug.



https://github.com/llvm/llvm-project/pull/75394


More information about the llvm-commits mailing list