Repository navigation
_lsprof.Profiler._creturn_callback() segfaults #126220
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Activity
- addedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on Oct 31, 2024 - addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Oct 31, 2024 Not just these two, but also others (like
_pystart_callback) all from #103534 CC @gaogaotiantianThis happens because
argsis never checked to have a proper length. I think thatTypeErrorshould be raised when these function do not have enough arguments (like we always do).I am working on a fix :)
- added3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes
on Nov 1, 2024 - added a commit that references this issue
on Nov 1, 2024 Can we close this isue?
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
It's possible to crash Python by simply calling the
._creturn_callback()or the._ccall_callback()methods of theProfilerclass in either_lsproforcProfile.Backtrace looks like:
Found using fusil by @vstinner.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, Windows
Output from running 'python -VV' on the command line:
No response
Linked PRs
_lsprofto Argument Clinic #126233_lsprof.Profilermethods with 0 args (backportable) #126271_lsprof.Profilermethods with 0 args (backportable) (GH-126271) #126310_lsprof.Profilermethods with 0 args (backportable) (GH-126271) #126311_lsprofto Argument Clinic (GH-126233) #126402