Browse Source

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

GitOrigin-RevId: de5e71147b
master
Megvii Engine Team 2 years ago
parent
commit
0a52b2587e
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      dnn/test/common/opr_proxy.h

+ 4
- 0
dnn/test/common/opr_proxy.h View File

@@ -579,6 +579,10 @@ struct OprWeightPreprocessProxyImpl : public OprProxyProfilingBase<Opr> {
}
AlgoProxy<Opr, arity>::exec(
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


Loading…
Cancel
Save