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:
Mark Shannon
2024-09-12 15:32:45 +01:00
committed by GitHub
parent 3ea51fa2e3
commit 4ed7d1d6ac
7 changed files with 344 additions and 327 deletions

View File

@@ -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;
}