-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Bug report
Bug description:
>>> def F(a,b):
... x=a*b
... frame = inspect.currentframe()
... print(frame.__sizeof__())
... return x
...
>>> F(1,2)
184
>>> F.__code__ = F.__code__.replace(co_stacksize=1000)
>>> F(1,2)
8152
>>> F.__code__ = F.__code__.replace(co_stacksize=2147483646)
>>> F(1,2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: ../Modules/gcmodule.c:2313: bad argument to internal function
It happens due to overflow in frame_sizeof
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump