[php-src] Issue #12596: Segmentation fault on AArch64 with phpdbg disabled and opcache.jit=1112

From: Date: Thu, 02 Nov 2023 03:38:29 +0000
Subject: [php-src] Issue #12596: Segmentation fault on AArch64 with phpdbg disabled and opcache.jit=1112
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245717@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12596 Author: pfustc ### Description This appears on **AArch64** build with phpdbg disabled. Build steps ``` $ bash buildconf $ bash configure --disable-phpdbg $ make -j 50 ``` INI ``` opcache.enable_cli=1 opcache.jit=1112 opcache.jit_buffer_size=16M ``` The following code: ```php <?php class test { function __construct() { if (empty($this->test[0][0])) { print "test1";} if (!isset($this->test[0][0])) { print "test2";} } } $test1 = new test(); ?> ``` Resulted in this output: ``` test1test2Segmentation fault (core dumped) ``` But I expected this output instead: ``` test1test2 ``` GDB ```gdb (gdb) r Starting program: /mnt/local/php-src/sapi/cli/php -c /mnt/local/www index.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". test1test2 Program received signal SIGSEGV, Segmentation fault. 0x0000aaaaaaeea798 in execute_ex (ex=0x0) at /home/penli01/php-src/Zend/zend_vm_execute.h:57064 57064 EG(current_execute_data) = EX(prev_execute_data); (gdb) bt #0 0x0000aaaaaaeea798 in execute_ex (ex=0x0) at /home/penli01/php-src/Zend/zend_vm_execute.h:57064 #1 0x0000aaaaaaef5d18 in zend_execute (op_array=0xfffff5681800, return_value=<optimized out>) at /home/penli01/php-src/Zend/zend_vm_execute.h:61594 #2 0x0000aaaaaae71cf4 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /home/penli01/php-src/Zend/zend.c:1881 #3 0x0000aaaaaae06060 in php_execute_script (primary_file=0xfffff7a87200 <__GI__IO_doallocbuf+108>, primary_file@entry=0xfffffffdb300) at /home/penli01/php-src/main/main.c:2492 #4 0x0000aaaaaaf69570 in do_cli (argc=4, argv=0xaaaaab97bc60) at /home/penli01/php-src/sapi/cli/php_cli.c:966 #5 0x0000aaaaaabbc9bc in main (argc=4, argv=<optimized out>) at /home/penli01/php-src/sapi/cli/php_cli.c:1340 (gdb) ``` ### PHP Version PHP master @ https://github.com/php/php-src/commit/95c8ad2bd6bd9d32b6a3b44fde94a84b0acbb6a9 ### Operating System Ubuntu 22.04

« previous php.bugs (#245717) next »