Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-96421: Insert shim frame on entry to interpreter #96319

Merged
merged 39 commits into from
Nov 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4d5e9a5
Handle _PyEval_EvalFrameDefault exit in bytecode.
markshannon Aug 24, 2022
cf78d2b
Merge branch 'main' into entry-frame
markshannon Aug 25, 2022
7f5348a
Get entry frame shim working.
markshannon Aug 26, 2022
59e7727
Delay destruction of trampoline code object and make symbol private
markshannon Aug 30, 2022
9f710e6
Make sure that previous never points into the C stack after return.
markshannon Aug 30, 2022
4ee84ab
Use explicit stacksize in _Py_MakeTrampoline. Allow interpreter to cl…
markshannon Aug 30, 2022
f5161e3
Move assert before use.
markshannon Aug 31, 2022
06c2ad6
Use typedef name.
markshannon Aug 31, 2022
cb6134e
Merge branch 'main' into entry-frame
markshannon Sep 5, 2022
11b3b17
Merge branch 'main' into entry-frame
markshannon Sep 7, 2022
053f488
More on-stack C structs into a big struct and add sentinels, as we wa…
markshannon Sep 8, 2022
4dad69a
Skip a test if ASAN is turned on.
markshannon Sep 8, 2022
0db3b25
Remove extra semicolons.
markshannon Sep 9, 2022
05b4f68
Add news
markshannon Sep 9, 2022
6cca61c
Merge branch 'main' into entry-frame
markshannon Sep 9, 2022
5099861
Merge branch 'main' into entry-frame
markshannon Sep 13, 2022
4015c72
Halve the number of writes for shim frame.
markshannon Sep 14, 2022
fb19e94
Remove one more write to shim frame.
markshannon Sep 14, 2022
95ef81b
Fix lltrace
markshannon Sep 14, 2022
972425d
Merge branch 'main' into entry-frame
markshannon Oct 19, 2022
aa8bd73
Remove first_instr local variable.
markshannon Oct 19, 2022
f7072e1
Add news and update frame_layout.md
markshannon Oct 19, 2022
52406d2
Merge branch 'main' into entry-frame
markshannon Oct 19, 2022
bd2b0ee
Remove debugging scaffolding and give C compiler more freedom to layo…
markshannon Oct 20, 2022
10b03c8
Remove typo
markshannon Oct 20, 2022
b62f5f3
Address code review comments.
markshannon Oct 21, 2022
1a0b08f
Generate linetable when creating shim code.
markshannon Oct 21, 2022
76e437a
Bundle shim code definition into single struct.
markshannon Oct 21, 2022
945e26a
Remove incorrect assert.
markshannon Oct 21, 2022
676321a
assert generator is cleared after returning or raising.
markshannon Oct 21, 2022
3cb22e6
Rename pyframe to entry_frame.
markshannon Oct 21, 2022
e5dcbd9
Pass correct length.
markshannon Oct 21, 2022
bd29356
Address review comments
markshannon Nov 7, 2022
9446325
Merge branch 'main' into entry-frame
markshannon Nov 7, 2022
f6a6457
Post merge cleanup
markshannon Nov 8, 2022
d113655
Turn ASAN back on for subprocess test.
markshannon Nov 8, 2022
ed7af1e
Apply suggestions from code review
markshannon Nov 9, 2022
48410d9
Merge branch 'main' into entry-frame
markshannon Nov 9, 2022
7cda3ef
Merge branch 'main' into entry-frame
markshannon Nov 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Halve the number of writes for shim frame.
  • Loading branch information
markshannon committed Sep 14, 2022
commit 4015c72847c9851265880df6e2a13cbd3f472b7f
10 changes: 6 additions & 4 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,13 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int

/* Push frame */
cframe.pyframe.f_funcobj = Py_None;
cframe.pyframe.f_globals = NULL;
cframe.pyframe.f_builtins = NULL;
cframe.pyframe.f_locals = NULL;
cframe.pyframe.frame_obj = NULL;
assert(tstate->interp->interpreter_trampoline != NULL);
#ifdef Py_DEBUG
cframe.pyframe.f_locals = (PyObject*)0xaaa1;
cframe.pyframe.frame_obj = (PyFrameObject*)0xaaa2;
cframe.pyframe.f_globals = (PyObject*)0xaaa3;
cframe.pyframe.f_builtins = (PyObject*)0xaaa4;
#endif
cframe.pyframe.f_code = tstate->interp->interpreter_trampoline;
_Py_CODEUNIT *code = _PyCode_CODE(tstate->interp->interpreter_trampoline);
cframe.pyframe.prev_instr = code;
Expand Down