[php-src] Issue #18745: GET_OP1_OBJ_ZVAL_PTR_DEREF does not actually DEREF

From: Date: Tue, 03 Jun 2025 13:48:22 +0000
Subject: [php-src] Issue #18745: GET_OP1_OBJ_ZVAL_PTR_DEREF does not actually DEREF
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250199@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/18745 Author: TimWolla ### Description The following code: ```php obj = GET_OP1_OBJ_ZVAL_PTR_DEREF(BP_VAR_R); ZEND_ASSERT(!Z_ISREF_P(obj)); ``` Resulted in this output: ``` php: Zend/zend_vm_execute.h:2812: const zend_op *ZEND_CLONE_SPEC_HANDLER(zend_execute_data *, const zend_op *): Assertion `!(zval_get_type(&(*(obj))) == 10)' failed. ``` But I expected this output instead: ``` No assertion failure ``` ------------- Found as part of the clone-with work, while investigating whether or not the current OPcode specialization for ZEND_CLONE is meaningful or not. A specialized handler for CONST likely is not necessary, since object literals are not a thing. ### PHP Version ```plain git master ``` ### Operating System _No response_

« previous php.bugs (#250199) next »