diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2023-08-09 11:19:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 18:19:39 +0000 |
commit | a9caf9cf9041d6d0b69f8be0fd778dd1f9b50e74 (patch) | |
tree | 5e325bac9eda1b264d3e5fd32991eed91d243f16 /Python/specialize.c | |
parent | 0a7f48b9a8d54809f1e9272337aefe2444158e64 (diff) | |
download | cpython-a9caf9cf9041d6d0b69f8be0fd778dd1f9b50e74.tar.gz cpython-a9caf9cf9041d6d0b69f8be0fd778dd1f9b50e74.zip |
GH-105848: Simplify the arrangement of CALL's stack (GH-107788)
Diffstat (limited to 'Python/specialize.c')
-rw-r--r-- | Python/specialize.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index 855252e066d..98455ae3efc 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -793,6 +793,10 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name) if (!function_check_args(fget, 1, LOAD_ATTR)) { goto fail; } + if (instr->op.arg & 1) { + SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD); + goto fail; + } uint32_t version = function_get_version(fget, LOAD_ATTR); if (version == 0) { goto fail; @@ -859,6 +863,10 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name) if (!function_check_args(descr, 2, LOAD_ATTR)) { goto fail; } + if (instr->op.arg & 1) { + SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD); + goto fail; + } uint32_t version = function_get_version(descr, LOAD_ATTR); if (version == 0) { goto fail; |