aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@fb.com>2023-08-08 17:09:02 -0700
committerGreg Clayton <gclayton@fb.com>2023-09-01 14:11:27 -0700
commit576f3f0cc930dc9aee157b76dd80319dfe7d51b9 (patch)
tree44db8d3302393c7abf606cd15965699cea20eada /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parent57595086db5c9180bf6a248ed90f8e83a2c66752 (diff)
downloadllvm-576f3f0cc930dc9aee157b76dd80319dfe7d51b9.zip
llvm-576f3f0cc930dc9aee157b76dd80319dfe7d51b9.tar.gz
llvm-576f3f0cc930dc9aee157b76dd80319dfe7d51b9.tar.bz2
Make DWARFContext more thread safe.
llvm-gsymutil uses a DWARFContext from multiple threads as it parses each compile unit. As it finds issues it might end up dumping a DIE to an output stream which can cause accesses to the DWARFContext from multiple threads. In llvm-gsymutil it can end up dumping a DIE from multiple threads into thread specific stream which was causing DWARFContext::getTUIndex() to be called and can crash the process. This fix puts a recursive mutex into the DWARFContext class and makes most APIs threadsafe for access. Many of the methods in DWARFContext will check if a member variable has been filled in yet, and parse what is needed and populate a member variagle with the results. Now a mutex protects these functions. Differential Revision: https://reviews.llvm.org/D157459
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions