提交 0a52b258 编写于 作者: M Megvii Engine Team

fix(opencl/test): fix test weight preprocess filter UAF issue

GitOrigin-RevId: de5e71147bf9a31344e1d85f01f8f4e4d0329f58
上级 8fe8edf4
...@@ -579,6 +579,10 @@ struct OprWeightPreprocessProxyImpl : public OprProxyProfilingBase<Opr> { ...@@ -579,6 +579,10 @@ struct OprWeightPreprocessProxyImpl : public OprProxyProfilingBase<Opr> {
} }
AlgoProxy<Opr, arity>::exec( AlgoProxy<Opr, arity>::exec(
opr, tensors, &preprocessed_filter, Base::W.workspace()); opr, tensors, &preprocessed_filter, Base::W.workspace());
//! as preprocess_tensors will call destructor at end of this function,
//! sync to wait worker consume preprocess_tensors, to prevent use after free
//! case happen
megcoreSynchronize(opr->handle()->megcore_computing_handle());
} }
//! handle weight preprocess //! handle weight preprocess
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册