[compiler-rt] [compiler-rt] Also consider SIGPROF as a synchronous signal (PR #85188)

Nazım Can Altınova via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 05:18:26 PDT 2024


canova wrote:

@dvyukov Thanks for the answer!

> For raw syscalls sanitizers provide [these hooks](https://github.com/llvm/llvm-project/blob/main/compiler-rt/include/sanitizer/linux_syscall_hooks.h), but they need to be inserted manually into code.

Oh, do you mean that they need to be inserted by the program that's calling the syscall (Rust stdlib internals in our case) or be inserted somewhere in the compiler-rt? I actually tried adding these but couldn't make them work. I can give it another try.

> Potentially tsan can be made to delay signals only for the duration of a single runtime callback, but that's a large endeavor and it's not completely clear how to do it.

Yeah, tbh even though this PR wasn't "technically correct", I was happy to have it because current async signal implementation in TSan looks pretty flaky. We have encountered these 2 functions that are marked incorrectly while testing the Firefox Profiler, but there is no guarantee that we would not encounter another one in the future (or when these are solved). 

Currently nearly all the Firefox Profiler tests are disabled on TSan builds in CI because of hangs and timeouts. And I wanted to enable them to give us more confidence but that proved to be a big challenge.

I'm happy to help to make it better but indeed this suggested mechanism sounds like a big change.

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


More information about the llvm-commits mailing list