HomePhabricator

[TypeSystem] Guard the global `ASTSourceMap` with a mutex

Description

[TypeSystem] Guard the global ASTSourceMap with a mutex

s_source_map in ClangExternalASTSourceCommon.cpp is unguarded
and therefore can break in multithreaded conditions. This can
cause crashes in particular if multiple targets are being set
up at once.

This patch wraps s_source_map in a function that ensures
exclusivity, and makes every user of it use that function
instead.

rdar://problem/33429774 lldb crashes after "resume_off"

Differential Revision: https://reviews.llvm.org/D35083

Details

Committed
spyffeJul 25 2017, 10:33 AM
Differential Revision
D35083: [TypeSystem] Guard the global `ASTSourceMap` with a mutex
Branches
Unknown
Tags
Unknown