[all-commits] [llvm/llvm-project] c7081b: tsan: fix crash during thread exit
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Tue Nov 16 07:43:25 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7081b5b4cb57f27e6a075e1b5a63b7951cd8a7a
https://github.com/llvm/llvm-project/commit/c7081b5b4cb57f27e6a075e1b5a63b7951cd8a7a
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2021-11-16 (Tue, 16 Nov 2021)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
A compiler-rt/test/tsan/Linux/sethostent.cpp
Log Message:
-----------
tsan: fix crash during thread exit
Use of gethostent provokes caching of some resources inside of libc.
They are freed in __libc_thread_freeres very late in thread lifetime,
after our ThreadFinish. __libc_thread_freeres calls free which
previously crashed in malloc hooks.
Fix it by setting ignore_interceptors for finished threads,
which in turn prevents malloc hooks.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113989
More information about the All-commits
mailing list