-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-34126: fix crashes while profiling certain invalid calls #8300
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
Conversation
| // We need to create PyCFunctionObject for tracing. | ||
| PyMethodDescrObject *descr = (PyMethodDescrObject*)func; | ||
| func = PyCFunction_NewEx(descr->d_method, stack[0], NULL); | ||
| if (nargs > 0 && tstate->use_tracing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the check for tstate->c_profilefunc is missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That check is actually redundant. The old code was checking tstate->use_tracing && tstate->c_profilefunc twice (once here and once in the C_TRACE macro). It's not wrong to keep the additional tstate->c_profilefunc check but it's just not needed.
|
Thanks @jdemeyer for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
(cherry picked from commit 56868f9) Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
|
GH-8371 is a backport of this pull request to the 3.7 branch. |
Needs backport to 3.7
https://bugs.python.org/issue34126