From 3590ecc10e201b38dedacab37430e7fa5cd420b8 Mon Sep 17 00:00:00 2001 From: "Madsen, Jonathan" Date: Mon, 30 Jun 2025 17:51:26 -0500 Subject: [PATCH] [SDK] Fix buffer tracing stringify of stack-allocated char* buffer (#429) * [SDK] Fix buffer tracing stringify of stack-allocated char* buffer * Formatting --------- Co-authored-by: Jonathan R. Madsen --- source/include/rocprofiler-sdk/hip/api_args.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/include/rocprofiler-sdk/hip/api_args.h b/source/include/rocprofiler-sdk/hip/api_args.h index 2c40358308..f036d90109 100644 --- a/source/include/rocprofiler-sdk/hip/api_args.h +++ b/source/include/rocprofiler-sdk/hip/api_args.h @@ -399,7 +399,8 @@ typedef union rocprofiler_hip_api_args_t } hipDeviceGetMemPool; struct { - char* name; + void* name; // changed to void* (real: char*) to avoid stringify on stack-allocated output + // parameter int len; hipDevice_t device; } hipDeviceGetName; @@ -412,9 +413,10 @@ typedef union rocprofiler_hip_api_args_t } hipDeviceGetP2PAttribute; struct { - char* pciBusId; - int len; - int device; + void* pciBusId; // changed to void* (real: char*) to avoid stringify on stack-allocated + // output parameter + int len; + int device; } hipDeviceGetPCIBusId; struct { @@ -1046,8 +1048,9 @@ typedef union rocprofiler_hip_api_args_t hipGraphExec_t* pGraphExec; hipGraph_t graph; hipGraphNode_t* pErrorNode; - char* pLogBuffer; - size_t bufferSize; + void* pLogBuffer; // changed to void* (real: char*) to avoid stringify on stack-allocated + // output parameter + size_t bufferSize; } hipGraphInstantiate; struct {