From eb836ba6426158d590e4e047cbe21c85dc049eed Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 7 Aug 2018 17:56:54 -0400
Subject: [PATCH] P4 to Git Change 1590524 by gandryey@gera-lnx-rcf on
2018/08/07 17:38:31
SWDEV-160552 - [CQE OCL][DTB][BD][Perf][QR][G] Soft hang is observed with ProRender after few subtests due to base driver.
- Reset the pointer to nullptr if PAL platform was destroyed
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#102 edit
[ROCm/clr commit: 1a61f6b9e52b1b56a914fb9be2ff56bd885200aa]
---
projects/clr/rocclr/runtime/device/pal/paldevice.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
index 97a33aaf1d..39c2108f72 100644
--- a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
@@ -1218,12 +1218,16 @@ bool Device::init() {
}
void Device::tearDown() {
- platform_->Destroy();
- delete platformObj_;
+ if (platform_ != nullptr) {
+ platform_->Destroy();
+ delete platformObj_;
+ platform_ = nullptr;
+ }
#if !defined(WITH_LIGHTNING_COMPILER)
if (compiler_ != nullptr) {
aclCompilerFini(compiler_);
+ compiler_ = nullptr;
}
#endif // !defined(WITH_LIGHTNING_COMPILER)
}