[libcxx-commits] [libcxx] [libc++] Don't try to wait on a thread that hasn't started in std::async (PR #125433)

kadir çetinkaya via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 6 03:46:47 PST 2025


kadircet wrote:

hi folks, we've also started seeing some use-after-free issues after this patch in clangd. I've sent out https://github.com/llvm/llvm-project/pull/130077/files to stop the bleeding for now, but I feel like there's something off with this change.

Pattern in clangd looks like:
```cpp
void bar() {
   std::future<...> x = std::async(std::launch::async, [some_state]{ // uses some_state; });
   // destruct x, don't block explicitly for completion of async task. relying on 
}
```

after this patch destructor doesn't block on completion of async task in the future, as a result we free `some_state` and hit use after free as the execution of the async task makes progress.

so this code is relying on:
- ~future() releasing the shared state, https://eel.is/c++draft/futures#unique.future-10.1
- which should block until shared state is ready, https://eel.is/c++draft/futures.state#5.3
- shared state becoming ready implies, async task completing, https://eel.is/c++draft/futures.async#4

I am not an expert here, so my reading of the standard might be wrong hence I am leaving the final call to you folks. but I feel like this is a rather common pattern and changing behavior here might yield breakages in existing code.

Moreover patch description mentions `Don't try to wait on a thread that hasn't started`, that's clearly not the case here. we've got a task that's already running hence I feel like this is not an intended affect of this patch (LMK if I can provide more info).



<details>
<summary>full asan failure</summary>

```cpp
=================================================================
==3188==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c72c1ac8c40 at pc 0x7f5736d7521b bp 0x7b52a9c39dc0 sp 0x7b52a9c39db8
READ of size 8 at 0x7c72c1ac8c40 thread T49
    #0 0x7f5736d7521a in __invoke<void (std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> >::*)(), std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> > *, void> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h:147](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h?l=147&ws=eaeltsin/6692&snapshot=611):25
    #1 0x7f5736d7521a in __thread_execute<std::__u::unique_ptr<std::__u::__thread_struct, std::__u::default_delete<std::__u::__thread_struct> >, void (std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> >::*)(), std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> > *, 2UL> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h:200](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h?l=200&ws=eaeltsin/6692&snapshot=611):3
    #2 0x7f5736d7521a in void* std::__u::__thread_proxy<std::__u::tuple<std::__u::unique_ptr<std::__u::__thread_struct, std::__u::default_delete<std::__u::__thread_struct>>, void (std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>::*)(), std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>*>>(void*) [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h:209](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h?l=209&ws=eaeltsin/6692&snapshot=611):3
    #3 0x55a92182aef0 in asan_thread_start(void*) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:239](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=239&ws=eaeltsin/6692&snapshot=611):28
    #4 0x7f5726b477da in start_thread (/usr/grte/v5/lib64/libpthread.so.0+0xb7da) (BuildId: b431ea3122d3e21a60bfe317db5010e3)

0x7c72c1ac8c40 is located 0 bytes inside of 296-byte region [0x7c72c1ac8c40,0x7c72c1ac8d68)
freed by thread T48 (task:foo.cpp) here:
    #0 0x55a921868842 in operator delete(void*, unsigned long) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:155](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp?l=155&ws=eaeltsin/6692&snapshot=611):3
    #1 0x7f5736d74a37 in std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>::~__async_assoc_state() third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:837:7
    #2 0x7f5736d74ab9 in __on_zero_shared third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:616:3
    #3 0x7f5736d74ab9 in std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>::__on_zero_shared() third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:870:9
    #4 0x7f5736d37029 in __release_shared [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__memory/shared_count.h:92](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__memory/shared_count.h?l=92&ws=eaeltsin/6692&snapshot=611):7
    #5 0x7f5736d37029 in ~future third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:987:15
    #6 0x7f5736d37029 in ~SpeculativeFuzzyFind [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.h:269](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.h?l=269&ws=eaeltsin/6692&snapshot=611):8
    #7 0x7f5736d37029 in std::__u::__optional_destruct_base<clang::clangd::SpeculativeFuzzyFind, false>::~__optional_destruct_base() third_party/crosstool/v18/llvm_unstable/src/libcxx/include/optional:300:15
    #8 0x7f5736d36967 in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:475](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp?l=475&ws=eaeltsin/6692&snapshot=611):3
    #9 0x7f5736d36967 in void llvm::detail::UniqueFunctionBase<void, llvm::Expected<clang::clangd::InputsAndPreamble>>::CallImpl<clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&, llvm::unique_function<void (llvm::Expected<clang::clangd::CodeCompleteResult>)>)::$_0>(void*, llvm::Expected<clang::clangd::InputsAndPreamble>&) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #10 0x7f57370b022c in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #11 0x7f57370b022c in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1811](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp?l=1811&ws=eaeltsin/6692&snapshot=611):5
    #12 0x7f57370b022c in void llvm::detail::UniqueFunctionBase<void>::CallImpl<clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function<void (llvm::Expected<clang::clangd::InputsAndPreamble>)>)::$_0>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #13 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #14 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:101](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=101&ws=eaeltsin/6692&snapshot=611):5
    #15 0x7f5722f1eeaf in operator()<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:45](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=45&ws=eaeltsin/6692&snapshot=611):11
    #16 0x7f5722f1eeaf in __invoke<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), (lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h:179](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h?l=179&ws=eaeltsin/6692&snapshot=611):25
    #17 0x7f5722f1eeaf in __apply_tuple_impl<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &, 0UL> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1380:5
    #18 0x7f5722f1eeaf in apply<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1384:5
    #19 0x7f5722f1eeaf in GenericThreadProxy<std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> > [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:43](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=43&ws=eaeltsin/6692&snapshot=611):5
    #20 0x7f5722f1eeaf in void* llvm::thread::ThreadProxy<std::__u::tuple<clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>)::$_1>>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:57](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=57&ws=eaeltsin/6692&snapshot=611):5
    #21 0x55a92182aef0 in asan_thread_start(void*) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:239](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=239&ws=eaeltsin/6692&snapshot=611):28
    #22 0x7f5726b477da in start_thread (/usr/grte/v5/lib64/libpthread.so.0+0xb7da) (BuildId: b431ea3122d3e21a60bfe317db5010e3)

previously allocated by thread T48 (task:foo.cpp) here:
    #0 0x55a921867bbd in operator new(unsigned long) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:86](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp?l=86&ws=eaeltsin/6692&snapshot=611):3
    #1 0x7f5736d7441e in std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> std::__u::__make_async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>(std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>&&) third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:1833:7
    #2 0x7f5736d7408e in std::__u::future<std::__u::__invoke_result<__decay(std::__u::pair<bool, clang::clangd::SymbolSlab>), __decay(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>), __decay(clang::clangd::Context)>::type> std::__u::async<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>(std::__u::launch, std::__u::pair<bool, clang::clangd::SymbolSlab>&&, llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context&&) third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:1878:14
    #3 0x7f5736d52c60 in runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab> > [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:128](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=128&ws=eaeltsin/6692&snapshot=611):10
    #4 0x7f5736d52c60 in startAsyncFuzzyFind [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1515](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=1515&ws=eaeltsin/6692&snapshot=611):10
    #5 0x7f5736d52c60 in run [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1657](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=1657&ws=eaeltsin/6692&snapshot=611):31
    #6 0x7f5736d52c60 in clang::clangd::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::PreambleData const*, clang::clangd::ParseInputs const&, clang::clangd::CodeCompleteOptions, clang::clangd::SpeculativeFuzzyFind*) [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:2304](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=2304&ws=eaeltsin/6692&snapshot=611):32
    #7 0x7f5736d365ca in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:460](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp?l=460&ws=eaeltsin/6692&snapshot=611):33
    #8 0x7f5736d365ca in void llvm::detail::UniqueFunctionBase<void, llvm::Expected<clang::clangd::InputsAndPreamble>>::CallImpl<clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&, llvm::unique_function<void (llvm::Expected<clang::clangd::CodeCompleteResult>)>)::$_0>(void*, llvm::Expected<clang::clangd::InputsAndPreamble>&) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #9 0x7f57370b022c in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #10 0x7f57370b022c in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1811](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp?l=1811&ws=eaeltsin/6692&snapshot=611):5
    #11 0x7f57370b022c in void llvm::detail::UniqueFunctionBase<void>::CallImpl<clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function<void (llvm::Expected<clang::clangd::InputsAndPreamble>)>)::$_0>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #12 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #13 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:101](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=101&ws=eaeltsin/6692&snapshot=611):5
    #14 0x7f5722f1eeaf in operator()<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:45](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=45&ws=eaeltsin/6692&snapshot=611):11
    #15 0x7f5722f1eeaf in __invoke<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), (lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h:179](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h?l=179&ws=eaeltsin/6692&snapshot=611):25
    #16 0x7f5722f1eeaf in __apply_tuple_impl<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &, 0UL> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1380:5
    #17 0x7f5722f1eeaf in apply<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1384:5
    #18 0x7f5722f1eeaf in GenericThreadProxy<std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> > [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:43](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=43&ws=eaeltsin/6692&snapshot=611):5
    #19 0x7f5722f1eeaf in void* llvm::thread::ThreadProxy<std::__u::tuple<clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>)::$_1>>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:57](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=57&ws=eaeltsin/6692&snapshot=611):5
    #20 0x55a92182aef0 in asan_thread_start(void*) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:239](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=239&ws=eaeltsin/6692&snapshot=611):28
    #21 0x7f5726b477da in start_thread (/usr/grte/v5/lib64/libpthread.so.0+0xb7da) (BuildId: b431ea3122d3e21a60bfe317db5010e3)

Thread T49 created by T48 (task:foo.cpp) here:
    #0 0x55a921811821 in pthread_create [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:250](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=250&ws=eaeltsin/6692&snapshot=611):3
    #1 0x7f5736d7451b in __libcpp_thread_create [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/support/pthread.h:182](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/support/pthread.h?l=182&ws=eaeltsin/6692&snapshot=611):10
    #2 0x7f5736d7451b in thread<void (std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> >::*)(), std::__u::__async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:130](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=130&ws=eaeltsin/6692&snapshot=611):7), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context> > *, 0> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h:219](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__thread/thread.h?l=219&ws=eaeltsin/6692&snapshot=611):14
    #3 0x7f5736d7451b in std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> std::__u::__make_async_assoc_state<std::__u::pair<bool, clang::clangd::SymbolSlab>, std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>>(std::__u::__async_func<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>&&) third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:1834:3
    #4 0x7f5736d7408e in std::__u::future<std::__u::__invoke_result<__decay(std::__u::pair<bool, clang::clangd::SymbolSlab>), __decay(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>), __decay(clang::clangd::Context)>::type> std::__u::async<std::__u::future<std::__u::pair<bool, clang::clangd::SymbolSlab>> clang::clangd::runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab>>(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>)::'lambda'(llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context), llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>, clang::clangd::Context>(std::__u::launch, std::__u::pair<bool, clang::clangd::SymbolSlab>&&, llvm::unique_function<std::__u::pair<bool, clang::clangd::SymbolSlab> ()>&&, clang::clangd::Context&&) third_party/crosstool/v18/llvm_unstable/src/libcxx/include/future:1878:14
    #5 0x7f5736d52c60 in runAsync<std::__u::pair<bool, clang::clangd::SymbolSlab> > [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h:128](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.h?l=128&ws=eaeltsin/6692&snapshot=611):10
    #6 0x7f5736d52c60 in startAsyncFuzzyFind [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1515](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=1515&ws=eaeltsin/6692&snapshot=611):10
    #7 0x7f5736d52c60 in run [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1657](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=1657&ws=eaeltsin/6692&snapshot=611):31
    #8 0x7f5736d52c60 in clang::clangd::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::PreambleData const*, clang::clangd::ParseInputs const&, clang::clangd::CodeCompleteOptions, clang::clangd::SpeculativeFuzzyFind*) [third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:2304](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp?l=2304&ws=eaeltsin/6692&snapshot=611):32
    #9 0x7f5736d365ca in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:460](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp?l=460&ws=eaeltsin/6692&snapshot=611):33
    #10 0x7f5736d365ca in void llvm::detail::UniqueFunctionBase<void, llvm::Expected<clang::clangd::InputsAndPreamble>>::CallImpl<clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&, llvm::unique_function<void (llvm::Expected<clang::clangd::CodeCompleteResult>)>)::$_0>(void*, llvm::Expected<clang::clangd::InputsAndPreamble>&) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #11 0x7f57370b022c in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #12 0x7f57370b022c in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1811](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp?l=1811&ws=eaeltsin/6692&snapshot=611):5
    #13 0x7f57370b022c in void llvm::detail::UniqueFunctionBase<void>::CallImpl<clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function<void (llvm::Expected<clang::clangd::InputsAndPreamble>)>)::$_0>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:222](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=222&ws=eaeltsin/6692&snapshot=611):12
    #14 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:387](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h?l=387&ws=eaeltsin/6692&snapshot=611):12
    #15 0x7f5722f1eeaf in operator() [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:101](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=101&ws=eaeltsin/6692&snapshot=611):5
    #16 0x7f5722f1eeaf in operator()<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:45](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=45&ws=eaeltsin/6692&snapshot=611):11
    #17 0x7f5722f1eeaf in __invoke<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), (lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15) &> [third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h:179](https://cs.corp.google.com/piper///depot/google3/third_party/crosstool/v18/llvm_unstable/src/libcxx/include/__type_traits/invoke.h?l=179&ws=eaeltsin/6692&snapshot=611):25
    #18 0x7f5722f1eeaf in __apply_tuple_impl<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &, 0UL> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1380:5
    #19 0x7f5722f1eeaf in apply<(lambda at [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:44](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=44&ws=eaeltsin/6692&snapshot=611):9), std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> &> third_party/crosstool/v18/llvm_unstable/src/libcxx/include/tuple:1384:5
    #20 0x7f5722f1eeaf in GenericThreadProxy<std::__u::tuple<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> > [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:43](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=43&ws=eaeltsin/6692&snapshot=611):5
    #21 0x7f5722f1eeaf in void* llvm::thread::ThreadProxy<std::__u::tuple<clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>)::$_1>>(void*) [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:57](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=57&ws=eaeltsin/6692&snapshot=611):5
    #22 0x55a92182aef0 in asan_thread_start(void*) [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:239](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=239&ws=eaeltsin/6692&snapshot=611):28
    #23 0x7f5726b477da in start_thread (/usr/grte/v5/lib64/libpthread.so.0+0xb7da) (BuildId: b431ea3122d3e21a60bfe317db5010e3)

Thread T48 (task:foo.cpp) created by T0 here:
    #0 0x55a921811821 in pthread_create [third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:250](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp?l=250&ws=eaeltsin/6692&snapshot=611):3
    #1 0x7f5313cd007a in llvm::llvm_execute_on_thread_impl(void* (*)(void*), void*, std::__u::optional<unsigned int>) third_party/llvm/llvm-project/llvm/lib/Support/Unix/Threading.inc:96:17
    #2 0x7f5722f1e97b in thread<(lambda at [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=98&ws=eaeltsin/6692&snapshot=611):15)> [third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h:133](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/Support/thread.h?l=133&ws=eaeltsin/6692&snapshot=611):12
    #3 0x7f5722f1e97b in clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>) [third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:107](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/support/Threading.cpp?l=107&ws=eaeltsin/6692&snapshot=611):16
    #4 0x7f573709a752 in clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function<void (llvm::Expected<clang::clangd::InputsAndPreamble>)>) [third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1814](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp?l=1814&ws=eaeltsin/6692&snapshot=611):18
    #5 0x7f5736d1c29b in clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&, llvm::unique_function<void (llvm::Expected<clang::clangd::CodeCompleteResult>)>) [third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:478](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp?l=478&ws=eaeltsin/6692&snapshot=611):18
    #6 0x7f573a3dd4c5 in clang::clangd::runCodeComplete(clang::clangd::ClangdServer&, llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions) [third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/SyncAPI.cpp:75](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/SyncAPI.cpp?l=75&ws=eaeltsin/6692&snapshot=611):10
    #7 0x7f573c00ea8e in clang::clangd::(anonymous namespace)::CompletionTest_EnableSpeculativeIndexRequest_Test::TestBody()::$_0::operator()(llvm::StringRef) const [third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2934](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp?l=2934&ws=eaeltsin/6692&snapshot=611):25
    #8 0x7f573c00e0f0 in clang::clangd::(anonymous namespace)::CompletionTest_EnableSpeculativeIndexRequest_Test::TestBody() [third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2949](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp?l=2949&ws=eaeltsin/6692&snapshot=611):3
    #9 0x7f53145ac861 in HandleExceptionsInMethodIfSupported<testing::Test, void> third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc
    #10 0x7f53145ac861 in testing::Test::Run() [third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc:2687](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc?l=2687&ws=eaeltsin/6692&snapshot=611):5
    #11 0x7f53145ae92c in testing::TestInfo::Run() [third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc:2836](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc?l=2836&ws=eaeltsin/6692&snapshot=611):11
    #12 0x7f53145b01e0 in testing::TestSuite::Run() [third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc:3015](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc?l=3015&ws=eaeltsin/6692&snapshot=611):30
    #13 0x7f53145cc9cf in testing::internal::UnitTestImpl::RunAllTests() [third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc:5920](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc?l=5920&ws=eaeltsin/6692&snapshot=611):44
    #14 0x7f53145cc23d in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc
    #15 0x7f53145cc01d in testing::UnitTest::Run() [third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc:5484](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/src/gtest.cc?l=5484&ws=eaeltsin/6692&snapshot=611):10
    #16 0x7f531522374b in RUN_ALL_TESTS [third_party/llvm/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2317](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h?l=2317&ws=eaeltsin/6692&snapshot=611):73
    #17 0x7f531522374b in main [third_party/llvm/llvm-project/third-party/unittest/UnitTestMain/TestMain.cpp:75](https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/third-party/unittest/UnitTestMain/TestMain.cpp?l=75&ws=eaeltsin/6692&snapshot=611):10
    #18 0x7f535c9f73d3 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x613d3) (BuildId: 9a996398ce14a94560b0c642eb4f6e94)
    #19 0x55a92178c929 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120
```

</details>

https://github.com/llvm/llvm-project/pull/125433


More information about the libcxx-commits mailing list