Uh oh!
There was an error while loading. Please reload this page.
gh-126018: Avoid aborting due to unnecessary assert in sys.audit - #126020
Conversation
picnixz
commented
Oct 26, 2024
This likely requires some NEWS entry, for instance: Fix a crash in :func:`sys.audit` when passing a non-string argument. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
commented
Oct 26, 2024
FTR: 3.12 is not affected because the assertion does not exist: Lines 499 to 514 in 67b2701 |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
devdanzin
commented
Oct 27, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ZeroIntensity
left a comment
There was a problem hiding this comment.
This works, but I would be more comfortable just converting this to clinic.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
devdanzin
commented
Oct 27, 2024
I'm not too attached to this PR, but converting to AC is beyond my skills. If you or someone else wants to propose another PR with that approach, I'll gladly close this one. |
JelleZijlstra
commented
Oct 27, 2024
Converting to AC can wait for a later PR, and probably should be done only in main. |
Thanks @devdanzin for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…it` (pythonGH-126020) (cherry picked from commit 80eec52) Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
GH-126042 is a backport of this pull request to the 3.13 branch. |
…it` (python#126020) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…it` (python#126020) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This PR removes an assert in
sysmodule.cthat caused the interpreter to abort whensys.auditreceived a non-string as first argument.Without this assert, the code that runs the hooks will raise an exception instead.
sys.audit(0)aborts due to an assertion in debug build #126018