Skip to content

Commit 8e50659

Browse files
authored
fix(dsp): correct dspDestoryHandle to use cluster ID (MY_RANK % dsp_count) (#7357)
dspInitHandle uses MY_RANK % dsp_count but dspDestoryHandle used raw MY_RANK, causing heap corruption when MY_RANK >= dsp_count. Fixes issue #7269.
1 parent 72dd71c commit 8e50659

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/source_main/driver_run.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,6 @@ void Driver::finalize_hardware()
150150

151151
#ifdef __DSP
152152
std::cout << " ** Closing DSP Hardware..." << std::endl;
153-
mtfunc::dspDestoryHandle(GlobalV::MY_RANK);
153+
mtfunc::dspDestoryHandle(GlobalV::MY_RANK % PARAM.inp.dsp_count);
154154
#endif
155155
}

0 commit comments

Comments
 (0)