Repository navigation
frame.setlineno has serious flaws. #94438
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 Jun 30, 2022 - added3.11only security fixesonly security fixes3.12only security fixesonly security fixes
on Jun 30, 2022 Moving this back to release blocker because apparently, this could end in many changes.
I am missing some context here on what this is affecting so I changed it from deferred blocker to release blocker if we think we can delay this to 3.12, please, say so :)
It is out of date. For example it thinks that
PUSH_EXC_INFOpushes three values. It only pushes one.After failing to write a test that will crash on this, I analysed the code and realised that the "exception handling opcode" cases of the switch are no longer reachable - there is nothing that will initialise their stack[] entries, so they get skipped in the
continue;before the switch.I created a PR to use my favourite macro in these cases: #94582
We could backport it, but we don't have to.
31 remaining items
Shall we nevertheless close this, and open a more specific issue?
Yes.
Most, if not all, of the flaws I listed have been fixed.- moved this from In Progress to Done in Release and Deferred blockers 🚫
on Feb 27, 2023 - added a commit that references this issue
on Oct 26, 2023
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
The
frame_setlinenofunction works in in stages:The first steps is faulty (I think, I haven't demonstrated this) as it might be possible to jump to an instruction involved in frame creation. This should be easy to fix using the new
_co_firsttraceablefield.The second step has (at least) three flaws:
NULLs on the stack, making it possible to jump from a stack withNULLs to one that cannot handleNULLs.PUSH_EXC_INFOpushes three values. It only pushes one.Setting the line number of a frame is only possible in the debugger, so this isn't as terrible as might appear, but it definitely needs fixing.
Linked PRs
RuntimeWarningfor jump tests intest_sys_settrace#111341