mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
GH-123996: Explicitly mark 'self_or_null' as an array of size 1 to ensure that it is kept in memory for calls (GH-124003)
This commit is contained in:
parent
3ea51fa2e3
commit
4ed7d1d6ac
7 changed files with 344 additions and 327 deletions
16
Python/optimizer_cases.c.h
generated
16
Python/optimizer_cases.c.h
generated
|
@ -1686,11 +1686,13 @@
|
|||
|
||||
case _EXPAND_METHOD: {
|
||||
_Py_UopsSymbol *method;
|
||||
_Py_UopsSymbol *self;
|
||||
_Py_UopsSymbol **self;
|
||||
self = &stack_pointer[-1 - oparg];
|
||||
method = sym_new_not_null(ctx);
|
||||
self = sym_new_not_null(ctx);
|
||||
for (int _i = 1; --_i >= 0;) {
|
||||
self[_i] = sym_new_not_null(ctx);
|
||||
}
|
||||
stack_pointer[-2 - oparg] = method;
|
||||
stack_pointer[-1 - oparg] = self;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2045,13 +2047,15 @@
|
|||
|
||||
case _EXPAND_METHOD_KW: {
|
||||
_Py_UopsSymbol *method;
|
||||
_Py_UopsSymbol *self;
|
||||
_Py_UopsSymbol **self;
|
||||
_Py_UopsSymbol *kwnames;
|
||||
self = &stack_pointer[-2 - oparg];
|
||||
method = sym_new_not_null(ctx);
|
||||
self = sym_new_not_null(ctx);
|
||||
for (int _i = 1; --_i >= 0;) {
|
||||
self[_i] = sym_new_not_null(ctx);
|
||||
}
|
||||
kwnames = sym_new_not_null(ctx);
|
||||
stack_pointer[-3 - oparg] = method;
|
||||
stack_pointer[-2 - oparg] = self;
|
||||
stack_pointer[-1] = kwnames;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue