From f47693b755498dc1287ad55dee1979d5c1cb8f7f Mon Sep 17 00:00:00 2001 From: "Hernandez, Gerardo" Date: Wed, 23 Jul 2025 12:19:12 +0100 Subject: [PATCH] SWDEV-534207 - fix use of uninitialized variable at hipEventRecord_common() (#771) [ROCm/clr commit: 2c6ec7df451d8b68464f8eda1dc432b1c377d621] --- projects/clr/hipamd/src/hip_event.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/src/hip_event.cpp b/projects/clr/hipamd/src/hip_event.cpp index e8dd8f3c5c..5b850721b7 100644 --- a/projects/clr/hipamd/src/hip_event.cpp +++ b/projects/clr/hipamd/src/hip_event.cpp @@ -397,15 +397,16 @@ hipError_t hipEventRecord_common(hipEvent_t event, hipStream_t stream, unsigned if ((stream != nullptr && stream != hipStreamLegacy) && (s->GetCaptureStatus() == hipStreamCaptureStatusActive)) { ClPrint(amd::LOG_INFO, amd::LOG_API, - "[hipGraph] Current capture node EventRecord on stream : %p, Event %p", stream, event); + "[hipGraph] Current capture node EventRecord on stream : %p, Event %p", stream, event); s->SetCaptureEvent(event); std::vector lastCapturedNodes = s->GetLastCapturedNodes(); e->SetNodesPrevToRecorded(lastCapturedNodes); if (flags == hipEventRecordExternal) { hip::GraphNode* pGraphNode; - status = hipGraphAddEventRecordNode((hipGraphNode_t*) pGraphNode, (hipGraph_t) s->GetCaptureGraph(), - (hipGraphNode_t*) s->GetLastCapturedNodes().data(), - s->GetLastCapturedNodes().size(), (hipEvent_t) e); + status = + hipGraphAddEventRecordNode((hipGraphNode_t*)&pGraphNode, (hipGraph_t)s->GetCaptureGraph(), + (hipGraphNode_t*)s->GetLastCapturedNodes().data(), + s->GetLastCapturedNodes().size(), (hipEvent_t)e); if (status != hipSuccess) { ClPrint(amd::LOG_ERROR, amd::LOG_API, "hipEventRecord add external event node failed"); return status;