aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-12-10 09:35:12 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2020-12-10 09:37:49 -0800
commitac25e8628c443cddd841c6c91d1c9e23e88969e5 (patch)
tree08ef94431cd80592ca088168e5c0f5b78f1f3448 /clang/lib/Frontend/CompilerInvocation.cpp
parent563879b6f9465982b422a69a901e3d84e7cb7764 (diff)
downloadllvm-ac25e8628c443cddd841c6c91d1c9e23e88969e5.zip
llvm-ac25e8628c443cddd841c6c91d1c9e23e88969e5.tar.gz
llvm-ac25e8628c443cddd841c6c91d1c9e23e88969e5.tar.bz2
[lldb] Deal gracefully with concurrency in the API instrumentation.
Prevent lldb from crashing when multiple threads are concurrently accessing the SB API with reproducer capture enabled. The API instrumentation records both the input arguments and the return value, but it cannot block for the duration of the API call. Therefore we introduce a sequence number that allows to to correlate the function with its result and add locking to ensure those two parts are emitted atomically. Using the sequence number, we can detect situations where the return value does not succeed the function call, in which case we print an error saying that concurrency is not (currently) supported. In the future we might attempt to be smarter and read ahead until we've found the return value matching the current call. Differential revision: https://reviews.llvm.org/D92820
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions