[php-src] Issue #19548: SEGV do_inherit_property zend_inheritance.c

From: Date: Fri, 22 Aug 2025 03:41:30 +0000
Subject: [php-src] Issue #19548: SEGV do_inherit_property zend_inheritance.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250596@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19548 Author: YuanchengJiang ### Description The following code: ```php <?php interface I { public mixed $i { get; } } class P { public mixed $i; } class C extends P implements I {} ``` Resulted in this output: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==2328==ERROR: AddressSanitizer: SEGV on unknown address 0x000041f47fa4 (pc 0x000006356528 bp 0x7ffef279c810 sp 0x7ffef279bcb0 T0) ==2328==The signal is caused by a WRITE memory access. #0 0x6356528 in do_inherit_property /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_inheritance.c:1567:22 #1 0x63620ce in do_interface_implementation /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_inheritance.c:2199:3 #2 0x6390324 in zend_do_implement_interfaces /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_inheritance.c:2312:3 #3 0x6372fad in zend_do_link_class /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_inheritance.c:3681:4 #4 0x5868d0e in zend_bind_class_in_slot /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_compile.c:1329:7 #5 0x5869fb2 in do_bind_class /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_compile.c:1362:9 #6 0x5fd48bf in ZEND_DECLARE_CLASS_SPEC_CONST_HANDLER /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_vm_execute.h:5805:2 #7 0x2ae64fc in zend_jit_trace_execute /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/opcache/jit/zend_jit_vm_helpers.c:995:12 #8 0x2b0c8b5 in zend_jit_trace_hot_root /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/opcache/jit/zend_jit_trace.c:8144:9 #9 0x2ad5916 in zend_jit_trace_counter_helper /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/opcache/jit/zend_jit_vm_helpers.c:418:7 #10 0x2ad4fa0 in zend_jit_func_trace_helper /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/opcache/jit/zend_jit_vm_helpers.c:441:2 #11 0x5ab3df3 in execute_ex /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_vm_execute.h:58709:12 #12 0x5ab637c in zend_execute /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_vm_execute.h:64398:2 #13 0x6834ed9 in zend_execute_script /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend.c:1976:3 #14 0x501957a in php_execute_script_ex /home/phpfuzz/WorkSpace/flowfusion/php-src/main/main.c:2647:13 #15 0x501a6b8 in php_execute_script /home/phpfuzz/WorkSpace/flowfusion/php-src/main/main.c:2687:9 #16 0x6849dea in do_cli /home/phpfuzz/WorkSpace/flowfusion/php-src/sapi/cli/php_cli.c:952:5 #17 0x68441cf in main /home/phpfuzz/WorkSpace/flowfusion/php-src/sapi/cli/php_cli.c:1363:18 #18 0x72ac9d84bd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #19 0x72ac9d84be3f in __libc_start_main csu/../csu/libc-start.c:392:3 #20 0x6061f4 in _start (/home/phpfuzz/WorkSpace/flowfusion/php-src/sapi/cli/php+0x6061f4) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_inheritance.c:1567:22 in do_inherit_property ==2328==ABORTING ``` To reproduce: ``` ./php-src/sapi/cli/php -d "opcache.protect_memory=1" -d "opcache.enable_cli=1" ./test.php ``` Commit: ``` cf33fd70ad1ad4bf9684c57a3e5cdd83efefdec5 ``` Configurations: ``` CC="clang-12" CXX="clang++-12" CFLAGS="-DZEND_VERIFY_TYPE_INFERENCE" CXXFLAGS="-DZEND_VERIFY_TYPE_INFERENCE" ./configure --enable-debug --enable-address-sanitizer --enable-undefined-sanitizer --enable-re2c-cgoto --enable-fpm --enable-litespeed --enable-phpdbg-debug --enable-zts --enable-bcmath --enable-calendar --enable-dba --enable-dl-test --enable-exif --enable-ftp --enable-gd --enable-gd-jis-conv --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-zend-test --with-zlib --with-bz2 --with-curl --with-enchant --with-gettext --with-gmp --with-mhash --with-ldap --with-libedit --with-readline --with-snmp --with-sodium --with-xsl --with-zip --with-mysqli --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-sqlite3 --with-pdo-sqlite --with-webp --with-jpeg --with-freetype --enable-sigchild --with-readline --with-pcre-jit --with-iconv ``` Operating System: ``` Ubuntu 20.04 Host, Docker 0599jiangyc/flowfusion:latest ``` *This report is automatically generated by [FlowFusion](https://github.com/php/flowfusion)* ### PHP Version ```plain cf33fd70ad1ad4bf9684c57a3e5cdd83efefdec5 ``` ### Operating System _No response_

« previous php.bugs (#250596) next »