Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dangling pointer bug in paddle/fluid/framework/executor.cc #11175

Closed
sneaxiy opened this issue Jun 5, 2018 · 0 comments
Closed

Dangling pointer bug in paddle/fluid/framework/executor.cc #11175

sneaxiy opened this issue Jun 5, 2018 · 0 comments

Comments

@sneaxiy
Copy link
Collaborator

sneaxiy commented Jun 5, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant