提交 99f9b310 编写于 作者: D dingminghui 提交者: jackzhang235

fix(multiclassnms): fix heap buffer overflow

bug caused by lazy malloc of tensor memory. while batchsize large than
1, output tensor is divided(shared memory), and each divided tensor do malloc.
上级 86bb150b
......@@ -369,6 +369,7 @@ void MulticlassNmsCompute::Run() {
}
} else {
outs->Resize({static_cast<int64_t>(num_kept), out_dim});
(void)outs->mutable_data<float>();
int offset = 0;
int* oindices = nullptr;
for (int i = 0; i < n; ++i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册