From e868ded6ef21dbfb98cb8dcfb7d3d3b7fa3024f1 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 8 Nov 2021 13:13:23 +0300 Subject: [PATCH] Don't call _zend_hash_index_find() for packed arrays --- ext/opcache/jit/zend_jit_helpers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index d19f67aa732..3ddaefd87e7 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -248,8 +248,11 @@ static zval* ZEND_FASTCALL zend_jit_symtable_find(HashTable *ht, zend_string *st static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw_no_packed(HashTable *ht, zend_long idx) { - zval *retval = _zend_hash_index_find(ht, idx); + zval *retval = NULL; + if (!HT_IS_PACKED(ht)) { + retval = _zend_hash_index_find(ht, idx); + } if (!retval) { if (UNEXPECTED(zend_undefined_offset_write(ht, idx) == FAILURE)) { return NULL;