-
Notifications
You must be signed in to change notification settings - Fork 747
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
CFGWalker with Single-thread failed #6557
Comments
In general we do not reset such global state in those classes. Typically they are used with If you use them in a non-parallel way then I can see how there would be a problem, and this is in Alternatively we could reset those fields, but that would just add code size and work for a situation that function-parallel code is meant to avoid, so I'd lean against that. |
Before this PR #6079, we can use CFGWalker with In fact, it may not be reset. In
|
I see, thanks @XMadrid . Yes, I guess that would be more consistent. Would you like to open a PR with it? |
Sure. I will do this. |
When use CFGWalker to walk module with single thread, get a double-free fault.
I found we introduced two varaible:
BasicBlock* exit = nullptr;
andbool hasSyntheticExit = false;
insrc/cfg/cfg-traversal.h
. And did not reset them indoWalkFunction
.In this case, the two variables from the previous function will still be used when we walk the subsequent function.
The text was updated successfully, but these errors were encountered: