tsan: strip __libc_start_main frame
We strip all frames below main but in some cases it may be not enough. Namely, when main is instrumented but does not call any other instrumented code. In this case __tsan_func_entry in main obtains PC pointing to __libc_start_main (as we pass caller PC to __tsan_func_entry), but nothing obtains PC pointing to main itself (as main does not call any instrumented code). In such case we will not have main in the stack, and stripping everything below main won't work. So strip __libc_start_main explicitly as well. But keep stripping of main because __libc_start_main is glibc/linux-specific, so looking for main is more reliable (and usually main is present in stacks). Depends on D106957. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106958
Loading
Please sign in to comment