Skip to content

Commit 2254f83

Browse files
committed
Fix bug in ENTER_EXECUTOR - on error go to resume_with_error
Now test_mmap on Windows passes, and hopefully so does test_threading on UNIX.
1 parent 44a1ffc commit 2254f83

File tree

5 files changed

+130
-4
lines changed

5 files changed

+130
-4
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,7 @@ dummy_func(
21802180
frame = executor->execute(executor, frame, stack_pointer);
21812181
if (frame == NULL) {
21822182
frame = cframe.current_frame;
2183-
goto error;
2183+
goto resume_with_error;
21842184
}
21852185
goto resume_frame;
21862186
}

Python/executor_cases.c.h

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/opcode_metadata.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,8 @@ const struct opcode_macro_expansion _PyOpcode_macro_expansion[256] = {
11351135
[UNARY_NEGATIVE] = { .nuops = 1, .uops = { { UNARY_NEGATIVE, 0, 0 } } },
11361136
[UNARY_NOT] = { .nuops = 1, .uops = { { UNARY_NOT, 0, 0 } } },
11371137
[UNARY_INVERT] = { .nuops = 1, .uops = { { UNARY_INVERT, 0, 0 } } },
1138+
[BINARY_SLICE] = { .nuops = 1, .uops = { { BINARY_SLICE, 0, 0 } } },
1139+
[STORE_SLICE] = { .nuops = 1, .uops = { { STORE_SLICE, 0, 0 } } },
11381140
[BINARY_SUBSCR_LIST_INT] = { .nuops = 1, .uops = { { BINARY_SUBSCR_LIST_INT, 0, 0 } } },
11391141
[BINARY_SUBSCR_TUPLE_INT] = { .nuops = 1, .uops = { { BINARY_SUBSCR_TUPLE_INT, 0, 0 } } },
11401142
[BINARY_SUBSCR_DICT] = { .nuops = 1, .uops = { { BINARY_SUBSCR_DICT, 0, 0 } } },
@@ -1193,6 +1195,8 @@ const struct opcode_macro_expansion _PyOpcode_macro_expansion[256] = {
11931195
[MATCH_KEYS] = { .nuops = 1, .uops = { { MATCH_KEYS, 0, 0 } } },
11941196
[GET_ITER] = { .nuops = 1, .uops = { { GET_ITER, 0, 0 } } },
11951197
[GET_YIELD_FROM_ITER] = { .nuops = 1, .uops = { { GET_YIELD_FROM_ITER, 0, 0 } } },
1198+
[BEFORE_ASYNC_WITH] = { .nuops = 1, .uops = { { BEFORE_ASYNC_WITH, 0, 0 } } },
1199+
[BEFORE_WITH] = { .nuops = 1, .uops = { { BEFORE_WITH, 0, 0 } } },
11961200
[WITH_EXCEPT_START] = { .nuops = 1, .uops = { { WITH_EXCEPT_START, 0, 0 } } },
11971201
[PUSH_EXC_INFO] = { .nuops = 1, .uops = { { PUSH_EXC_INFO, 0, 0 } } },
11981202
[EXIT_INIT_CHECK] = { .nuops = 1, .uops = { { EXIT_INIT_CHECK, 0, 0 } } },

Tools/cases_generator/generate_cases.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ def emit_macros(cls, out: Formatter):
313313
"exception_unwind",
314314
"import_from",
315315
"import_name",
316-
"_PyObject_CallNoArgs", # Proxy for BEFORE_WITH
317-
"_PyBuildSlice_ConsumeRefs", # Proxy for BINARY_SLICE, STORE_SLICE
318316
)
319317

320318

0 commit comments

Comments
 (0)