[PATCH] D98785: [Orc] Fix pending debug object tracking in DebugObjectManagerPlugin
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 09:24:41 PDT 2021
sgraenitz added a comment.
This is hard to reproduce with lli, because single-threaded execution with LLLazyJIT will implicitly sequence materialization. LLJIT instead materializes module dependencies recursively, which makes this issue easy to reproduce. Unfortunately, we have no LLJIT tool that I could use for a test. It's not the first time this limitation comes up for me and I wonder if it's worth adding an `orc-greedy` kind to lli. What do you think?
================
Comment at: llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp:522
+ // is still in-flight. If we have pending debug objects for such MRs, we
+ // will remove them here.
+ // FIXME: Getting the resource key from a MaterializationResponsibility is
----------------
Can we guaranteed that affected in-flight MRs are still alive at this point? Running the code as is works, but I wonder if it's a robust assumption.
================
Comment at: llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp:530
+ for (const auto &KV : PendingObjs) {
+ if (K == getResourceKey(*KV.first))
+ PendingMRsForKey.push_back(KV.first);
----------------
It's a different issue, but I realized that this might be a dangerous use of resource keys. They are only guaranteed to be valid within the lambda passed into `withResourceKeyDo()` right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98785/new/
https://reviews.llvm.org/D98785
More information about the llvm-commits
mailing list