Uh oh!
There was an error while loading. Please reload this page.
gh-96821: Fix undefined behaviour in _testcapimodule.c - #96915
Conversation
_testcapimodule.cmatthiasgoergens
commented
Sep 18, 2022
@kumaraditya303@mdickinson Would you please have a look? |
Uh oh!
There was an error while loading. Please reload this page.
…e-96821.Co2iOq.rst Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Fidget-Spinner
left a comment
There was a problem hiding this comment.
I think I've wrote similar code before elsewhere (just doing raw pointer arithmetic on an unverified args pointer). However, I don't recall where exactly now :(.
Anyways, thanks this LGTM.
matthiasgoergens
commented
Sep 19, 2022
Thanks! |
miss-islington
commented
Sep 19, 2022
Thanks @matthiasgoergens for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
miss-islington
commented
Sep 19, 2022
Thanks @matthiasgoergens for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
bedevere-bot
commented
Sep 19, 2022
GH-96926 is a backport of this pull request to the 3.10 branch. |
…nGH-96915) * pythongh-96821: Assert for demonstrating undefined behaviour * Fix UB Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit cbdeda8) Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
…nGH-96915) * pythongh-96821: Assert for demonstrating undefined behaviour * Fix UB Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit cbdeda8) Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
bedevere-bot
commented
Sep 19, 2022
GH-96927 is a backport of this pull request to the 3.11 branch. |
matthiasgoergens
commented
Sep 19, 2022
There was an example of this in eg Btw, this kind of null pointer arithmetic is perfectly defined, as long as we compile with |
The first commit demonstrates the undefined behaviour and is meant to fail tests.
The other commits fix it.
-fstrict-overflow#96821