This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sys.call_tracing(): check arguments type
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, vstinner
Priority: normal Keywords: patch

Created on 2010-01-31 03:16 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sys_call_tracing.patch vstinner, 2010-01-31 03:16
sys_call_tracing-2.patch vstinner, 2010-01-31 03:52
Messages (4)
msg98598 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-01-31 03:16
Ensure that "args" argument is a tuple. Fix the following crash:

        $ python -c "import sys; sys.call_tracing(open, u'a')"
        SystemError: ../Python/getargs.c:1413: bad argument to internal function
msg98603 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-01-31 03:52
Before someone is asking, i wrote a new version of my patch using an unit test. The patch also test sys.call_tracing() with valid arguments.
msg98631 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-01-31 22:08
This very fix was already done in py3k with issue3661.
Unfortunately it was decided at the time that 2.6 is not affected...
Patch is OK, please apply.
msg98633 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-01-31 22:37
> This very fix was already done in py3k with issue3661.

Oh! My patch is *very* close to this one. I just choosed 10 instead of 2 in the unit test :-) (and I added a test to check a valid argument, py3k doesn't check it).

> Patch is OK, please apply.

Done:  r77892 (r77893).
History
Date User Action Args
2022-04-11 14:56:57adminsetgithub: 52067
2010-01-31 22:37:20vstinnersetresolution: fixed
stage: commit review -> resolved
2010-01-31 22:37:07vstinnersetstatus: open -> closed

messages: + msg98633
2010-01-31 22:08:40amaury.forgeotdarcsetnosy: + amaury.forgeotdarc

messages: + msg98631
stage: commit review
2010-01-31 03:52:40vstinnersetfiles: + sys_call_tracing-2.patch

messages: + msg98603
2010-01-31 03:16:48vstinnercreate