[Offload] Check plugins aren't already deinitialized when tearing down (#148642)
This is a hotfix for #148615 - it fixes the issue for me locally. I think a broader issue is that in the test environment we're calling olShutDown from a global destructor in the test binaries. We should do something more controlled, either calling olInit/olShutDown in every test, or move those to a GTest global environment. I didn't do that originally because it looked like it needed changes to LLVM's GTest wrapper.
This commit is contained in:
parent
074218dd10
commit
47c9609a86
@ -231,7 +231,7 @@ Error olShutDown_impl() {
|
||||
|
||||
for (auto &P : OldContext->Platforms) {
|
||||
// Host plugin is nullptr and has no deinit
|
||||
if (!P.Plugin)
|
||||
if (!P.Plugin || !P.Plugin->is_initialized())
|
||||
continue;
|
||||
|
||||
if (auto Res = P.Plugin->deinit())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user