-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Unnecessary NULL check for code->_co_monitoring
in remove_tools
#131763
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
Comments
I think this is probably the case. I don't think |
I didn't find such a scenario either. In any case, the statement is incorrect. |
Your fix doesn't prevent segfault in non-debug build either. If we assume that monitoring never has null value (because assert(monitoring) here) then first part of following condition (monitoring && monitoring->tools) is just a tautology. |
There won't be a segfault here. |
code->_co_monitoring
in remove_tools
Uh oh!
There was an error while loading. Please reload this page.
If monitoring variable is equal to NULL then we'll get segmentation fault in
line 843 since monitoring = code->_co_monitoring.
Otherwise, the if statement is incorrect.
Linked PRs
The text was updated successfully, but these errors were encountered: