Skip to content

bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c#24073

Merged
vstinner merged 1 commit into
python:masterfrom
ZackerySpytz:bpo-42814-is_typing_name-va_end
Jan 3, 2021
Merged

bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c#24073
vstinner merged 1 commit into
python:masterfrom
ZackerySpytz:bpo-42814-is_typing_name-va_end

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Jan 3, 2021

Copy link
Copy Markdown
Contributor

In is_typing_name(), va_end() is not always called before the
function returns. It is undefined behavior to call va_start()
without also calling va_end().

https://bugs.python.org/issue42814

In is_typing_name(), va_end() is not always called before the
function returns.  It is undefined behavior to call va_start()
without also calling va_end().
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @ZackerySpytz and @vstinner, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 5d3553b0a8959e7505bbec4de03077dbf135ee4b 3.9

@vstinner

vstinner commented Jan 3, 2021

Copy link
Copy Markdown
Member

Ah, 3.9 doesn't use va_start() in Objects/genericaliasobject.c.

@Fidget-Spinner

Copy link
Copy Markdown
Member

Sorry, I didn't notice that in my original PR, thanks for catching this and fixing it Zackery!

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…thonGH-24073)

In is_typing_name(), va_end() is not always called before the
function returns.  It is undefined behavior to call va_start()
without also calling va_end().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants