This is a refactor patch that moves a couple of stacktrace taking and/or symbolizer-related functions from TSan, makes them generic and moves them into sanitizer_common. This is to prepare the functions for an upcoming patch implementing issue suppression mechanism into ASan. NFC intented.
There is a couple of subtle changes, that I'd like to make sure we're fine with:
- The #ifdef TSAN_GO changes into #ifdef SANITIZER_GO in the appropriate places.
- The internal_alloc(MBlockReportStack, sizeof(ReportStack)); becomes InternalAlloc(sizeof(ReportStack));, not sure if the MBlockReportStack is used for anything important.
- stack->pc to stack->info.address, how could this event work before???
- bool strip_main argument to SymbolizeStack whether it should try to strip the main function from the stack trace