Skip to content

bpo-38622: Ensure ctypes audit events pass tuples as a single argument#17243

Merged
zooba merged 1 commit into
python:masterfrom
zooba:bpo-38622
Nov 18, 2019
Merged

bpo-38622: Ensure ctypes audit events pass tuples as a single argument#17243
zooba merged 1 commit into
python:masterfrom
zooba:bpo-38622

Conversation

@zooba

@zooba zooba commented Nov 18, 2019

Copy link
Copy Markdown
Member

This only impacts PyObj_FromPtr - if the object is a tuple, PySys_Audit(... "O", ob) will treat it as the full set of arguments (as we do elsewhere in this file deliberately). But in this case, we want it to be passed as the sole argument of the event.

To repro on CPython: _ctypes.PyObj_FromPtr(id(a_tuple))

addressof shouldn't suffer the same thing, but it won't hurt to be sure. The other uses in this file are correct.

https://bugs.python.org/issue38622

@zooba zooba added type-bug An unexpected behavior, bug, or error skip news needs backport to 3.8 labels Nov 18, 2019
@zooba
zooba merged commit dcf1f83 into python:master Nov 18, 2019
@zooba
zooba deleted the bpo-38622 branch November 18, 2019 21:30
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 18, 2019
… single argument (pythonGH-17243)

(cherry picked from commit dcf1f83)

Co-authored-by: Steve Dower <steve.dower@python.org>
@bedevere-bot

Copy link
Copy Markdown

GH-17245 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Nov 18, 2019
… single argument (GH-17243)

(cherry picked from commit dcf1f83)

Co-authored-by: Steve Dower <steve.dower@python.org>
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants