Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 4, 2025

faulthandler now detects if a frame or a code object is invalid or
freed.

Add helper functions:

  • _PyCode_SafeAddr2Line()
  • _PyFrame_SafeGetCode()
  • _PyFrame_SafeGetLasti()

_PyMem_IsPtrFreed() now detects pointers in [-0xff, 0xff] range
as freed.
(cherry picked from commit a84181c)

Co-authored-by: Victor Stinner [email protected]

…40921)

faulthandler now detects if a frame or a code object is invalid or
freed.

Add helper functions:

* _PyCode_SafeAddr2Line()
* _PyFrame_SafeGetCode()
* _PyFrame_SafeGetLasti()

_PyMem_IsPtrFreed() now detects pointers in [-0xff, 0xff] range
as freed.
(cherry picked from commit a84181c)

Co-authored-by: Victor Stinner <[email protected]>
@vstinner vstinner enabled auto-merge (squash) November 4, 2025 11:14
@vstinner vstinner merged commit 331b4b8 into python:3.14 Nov 4, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants