From 285872c4be8405f21bdd97c39c6758d29eae6969 Mon Sep 17 00:00:00 2001 From: Felix Schlepper Date: Thu, 27 Nov 2025 09:52:04 +0100 Subject: [PATCH] ITS: GPU: reverse destruction order to fix crash Signed-off-by: Felix Schlepper --- GPU/GPUTracking/Global/GPUChainITS.cxx | 10 +++------- GPU/GPUTracking/Global/GPUChainITS.h | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/GPU/GPUTracking/Global/GPUChainITS.cxx b/GPU/GPUTracking/Global/GPUChainITS.cxx index 9be553de27f95..c72023bdf42ce 100644 --- a/GPU/GPUTracking/Global/GPUChainITS.cxx +++ b/GPU/GPUTracking/Global/GPUChainITS.cxx @@ -30,11 +30,11 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator return mFWReco->AllocateDirectMemory(size, mType); } void deallocate(char* ptr, size_t size) final {} // this is a simple no-op - void pushTagOnStack(uint64_t tag) + void pushTagOnStack(uint64_t tag) final { mFWReco->PushNonPersistentMemory(tag); } - void popTagOffStack(uint64_t tag) + void popTagOffStack(uint64_t tag) final { mFWReco->PopNonPersistentMemory(GPUDataTypes::RecoStep::ITSTracking, tag); } @@ -45,11 +45,7 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator }; } // namespace o2::its -GPUChainITS::~GPUChainITS() -{ - mITSTrackerTraits.reset(); - mITSVertexerTraits.reset(); -} +GPUChainITS::~GPUChainITS() = default; GPUChainITS::GPUChainITS(GPUReconstruction* rec) : GPUChain(rec) {} diff --git a/GPU/GPUTracking/Global/GPUChainITS.h b/GPU/GPUTracking/Global/GPUChainITS.h index a607f66322bab..4aa97f3f47784 100644 --- a/GPU/GPUTracking/Global/GPUChainITS.h +++ b/GPU/GPUTracking/Global/GPUChainITS.h @@ -34,7 +34,7 @@ class GPUChainITS final : public GPUChain friend class GPUReconstruction; public: - ~GPUChainITS() override; + ~GPUChainITS() final; int32_t Init() override; int32_t PrepareEvent() override; int32_t Finalize() override; @@ -50,10 +50,10 @@ class GPUChainITS final : public GPUChain protected: GPUChainITS(GPUReconstruction* rec); + std::unique_ptr mFrameworkAllocator; + std::unique_ptr> mITSTimeFrame; std::unique_ptr> mITSTrackerTraits; std::unique_ptr> mITSVertexerTraits; - std::unique_ptr> mITSTimeFrame; - std::unique_ptr mFrameworkAllocator; }; } // namespace o2::gpu