Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when supplying too many arguments to int() #114210

Closed
pschanely opened this issue Jan 17, 2024 · 2 comments
Closed

Segfault when supplying too many arguments to int() #114210

pschanely opened this issue Jan 17, 2024 · 2 comments
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@pschanely
Copy link
Contributor

pschanely commented Jan 17, 2024

Crash report

What happened?

Python 3.12 raises the expected TypeError int() takes at most 2 arguments (3 given) for the code below, but it causes a segfault in 3.13.0a2:

Python 3.13.0a2 (main, Jan  3 2024, 11:50:58) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> int("42", 10, 12)
zsh: segmentation fault  python

CPython versions tested on:

CPython 3.13.0a2

Operating systems tested on:

macOS

Output from running 'python -VV' on the command line:

Python 3.13.0a2 (main, Jan 3 2024, 11:50:58) [Clang 15.0.0 (clang-1500.1.0.2.5)]

@pschanely pschanely added the type-crash A hard crash of the interpreter, possibly with a core dump label Jan 17, 2024
@Eclips4
Copy link
Member

Eclips4 commented Jan 17, 2024

Hello!
There's the same problem as in #114050.
Closing as duplicate.

@Eclips4 Eclips4 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2024
@hugovk
Copy link
Member

hugovk commented Jan 17, 2024

And to confirm, bisecting between v3.13.a1 (TypeError) and v3.13.a2 (segmentation fault) gives the same 0887b9c:

0887b9ce8b5b4f9ecdef014b9329da78a46c9f42 is the first bad commit
commit 0887b9ce8b5b4f9ecdef014b9329da78a46c9f42
Date:   Thu Nov 2 15:07:47 2023 +0000

    GH-109369 Add vectorcall to `PyLong_Type` (GH-111642)

 Objects/longobject.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants