I raised an issue here, and I send this email because the problem is urgent:
https://github.com/google/sanitizers/issues/1759
Tsan disable ignores in CallUserSignalHandler when ignores are enabled before call signal handler,but it will make "CHECK_GT(thr->ignore_reads_and_writes, 0);" failed in ThreadIgnoreEnd if someone use siglongjmp in signal handler:
dlopen
- call ThreadIgnoreBegin
- thr->ignore_reads_and_writes++
- trigger signal
- CallUserSignalHandler
- thr->ignore_reads_and_writes = 0
- Call siglongjmp to jump to a normal position
- call ThreadIgnoreEnd
- CHECK_GT(thr->ignore_reads_and_writes, 0); // failed!
https://gitee.com/openharmony/third_party_llvm-project/blob/master/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp#L2006
Looking forward to your reply.