[all-commits] [llvm/llvm-project] 427fb5: [ORC] Track all dependencies on symbols that aren'...

Lang Hames via All-commits all-commits at lists.llvm.org
Sun Dec 1 18:17:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 427fb5cc5ac34414c4682c90d3db0c63c5a1b227
      https://github.com/llvm/llvm-project/commit/427fb5cc5ac34414c4682c90d3db0c63c5a1b227
  Author: Lang Hames <lhames at gmail.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M llvm/lib/ExecutionEngine/Orc/Core.cpp
    M llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp

  Log Message:
  -----------
  [ORC] Track all dependencies on symbols that aren't Ready yet.

AsynchronousSymbolQuery tracks the symbols that it depends on in order to (1)
detach the query in the event of a failure, and (2) report those dependencies
to clients of the ExecutionSession::lookup method (via the RegisterDependencies
argument). Previously we tracked only dependencies on symbols that didn't meet
the required state (the only symbols that the query needs to be attached to),
but this is insufficient to report all necessary dependencies to lookup clients.
E.g. A lookup requiring SymbolState::Resolved where some matched symbol is
already Resolved but not yet Emitted or Ready would result in the dependency on
that symbol not being reported, which could result in illegal access in
concurrent JIT setups. (This bug was discovered by @mikaoP on discord with a
simple concurrent JIT setup).

This patch tracks and reports all dependencies on symbols that aren't Ready yet,
correcting the under-reporting issue. AsynchronousSymbolQuery::detach is updated
to stop asserting that all depended-upon symbols have a query attached.



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