tsan: don't call dlsym during exit
dlsym calls into dynamic linker which calls malloc and other things. It's problematic to do it during the actual exit, because it can happen from a singal handler or from within the runtime after we reported the first bug, etc. See https://github.com/google/sanitizers/issues/1440 for an example (captured in the added test). Initialize the callbacks during startup instead. Depends on D110159. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D110166
Loading
Please register or sign in to comment