gh-106092: Fix use-after-free crash in frame_dealloc (#106875)
It was possible for the trashcan to delay the deallocation of a PyFrameObject until after its corresponding _PyInterpreterFrame has already been freed. So frame_dealloc needs to avoid dereferencing the f_frame pointer unless it first checks that the pointer still points to the interpreter frame within the frame object. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
A
Anders Kaseorg committed
557b05c7a5334de5da3dc94c108c0121f10b9191
Parent: 052a0d1
Committed by GitHub <noreply@github.com>
on 8/1/2023, 9:32:18 AM