You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the implementation of void Executor::Run(const ProgramDesc& program, Scope* scope, std::map<std::string, const LoDTensor*>* feed_targets, std::map<std::string, LoDTensor*>* fetch_targets, bool create_local_scope, bool create_vars, const std::string& feed_holder_name, const std::string& fetch_holder_name), when has_feed_ops or has_fetch_ops is false, a temporary unique_ptr object is created and the pointer it holds is assigned to copy_program. Thus, copy_program is a dangling pointer after the temporary object unique_ptr is destructed.
The text was updated successfully, but these errors were encountered:
In the implementation of
void Executor::Run(const ProgramDesc& program, Scope* scope, std::map<std::string, const LoDTensor*>* feed_targets, std::map<std::string, LoDTensor*>* fetch_targets, bool create_local_scope, bool create_vars, const std::string& feed_holder_name, const std::string& fetch_holder_name)
, whenhas_feed_ops
orhas_fetch_ops
isfalse
, a temporaryunique_ptr
object is created and the pointer it holds is assigned tocopy_program
. Thus,copy_program
is a dangling pointer after the temporary objectunique_ptr
is destructed.The text was updated successfully, but these errors were encountered: