[all-commits] [llvm/llvm-project] 593681: ORC: Fix flaky OrcLazy tests
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Fri Oct 2 16:42:34 PDT 2026
Branch: refs/heads/users/arsenm/orc/lookup-init-symbols-notify-under-lock
Home: https://github.com/llvm/llvm-project
Commit: 593681186a44360285299a1974384cbc38b0f7c0
https://github.com/llvm/llvm-project/commit/593681186a44360285299a1974384cbc38b0f7c0
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-10-03 (Sat, 03 Oct 2026)
Changed paths:
M llvm/lib/ExecutionEngine/Orc/Core.cpp
Log Message:
-----------
ORC: Fix flaky OrcLazy tests
I've seen this fail a few too many times so just let AI deal with it. I don't
know anything about orc, but extend lifetime of lock_guard seems plausible.
Notify lookupInitSymbols CV while holding the mutex
The init-symbol lookup completion callback decremented Count under
LookupMutex but called CV.notify_one() after releasing it. The waiting
thread could observe Count == 0, return from lookupInitSymbols, and
destroy the stack-allocated mutex and condition variable before the
callback signalled it. With concurrent compile threads the callback runs
on a dispatcher thread, so the late notify wrote into reused stack
memory, e.g. during endSession right after deinitialize.
This caused intermittent crashes in
ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll on macOS
(#50408, #126982). MachOPlatform and ELFNixPlatform already notify their
bootstrap condition variables under the mutex for the same reason.
Co-authored-by: Claude <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list