From 8e517e935227ba8ce8072b09f6652d736dd6b471 Mon Sep 17 00:00:00 2001 From: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com> Date: Mon, 18 May 2026 09:12:10 +0800 Subject: [PATCH] fix(dsp): correct dspDestoryHandle to use cluster ID (MY_RANK % dsp_count) dspInitHandle uses MY_RANK % dsp_count but dspDestoryHandle used raw MY_RANK, causing heap corruption when MY_RANK >= dsp_count. Fixes issue #7269. --- source/source_main/driver_run.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/source_main/driver_run.cpp b/source/source_main/driver_run.cpp index 9ed8af5c5db..4ced008d67a 100644 --- a/source/source_main/driver_run.cpp +++ b/source/source_main/driver_run.cpp @@ -150,6 +150,6 @@ void Driver::finalize_hardware() #ifdef __DSP std::cout << " ** Closing DSP Hardware..." << std::endl; - mtfunc::dspDestoryHandle(GlobalV::MY_RANK); + mtfunc::dspDestoryHandle(GlobalV::MY_RANK % PARAM.inp.dsp_count); #endif }