Bug #80805 [Opn->Ver]: create simple class and get error in opcache.so

From: Date: Fri, 26 Feb 2021 20:01:18 +0000
Subject: Bug #80805 [Opn->Ver]: create simple class and get error in opcache.so
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232406@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80805&edit=1 ID: 80805 Updated by: requinix@php.net Reported by: alexandr dot budko at gmail dot com Summary: create simple class and get error in opcache.so -Status: Open +Status: Verified Type: Bug -Package: FPM related +Package: opcache Operating System: Debian 10 PHP Version: 7.4.15 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2021-02-26 19:09:58] alexandr dot budko at gmail dot com Description: ------------ If run this script after a few second I get 502 nginx error. there will be no error if: - change type in property <int $foo;> to <?int $foo = null;> - clear type in property <int $foo;> to <$foo;> - change method inc() to <$result = $this->foo += 2; return $result;> Info: ------ OS System Linux devtest 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 php-fpm 7.4.15 || php-fpm 7.4.9 || php-fpm 7.4.4 nginx 1.18.0 xdebug disabled. When xdebug enabled (with remote IDE) script works without error. opcache default settings. -------- GDB bt [New LWP 412] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `php-fpm: pool www '. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007ff739942263 in ?? () from /usr/lib/php/20190902/opcache.so #1 0x00007ff739952444 in ?? () from /usr/lib/php/20190902/opcache.so #2 0x00007ff7399589b8 in ?? () from /usr/lib/php/20190902/opcache.so #3 0x00007ff739958b64 in ?? () from /usr/lib/php/20190902/opcache.so #4 0x00007ff73993c08a in ?? () from /usr/lib/php/20190902/opcache.so #5 0x00007ff73992d9bf in ?? () from /usr/lib/php/20190902/opcache.so #6 0x00007ff7399195f1 in ?? () from /usr/lib/php/20190902/opcache.so #7 0x0000558a4680089c in zend_execute_scripts () #8 0x0000558a4679fc90 in php_execute_script () #9 0x0000558a46668a49 in ?? () #10 0x00007ff73bcb909b in __libc_start_main (main=0x558a46667bc0, argc=4, argv=0x7ffdd6b35a68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdd6b35a58) at ../csu/libc-start.c:308 #11 0x0000558a4666985a in _start () Test script: --------------- class Test { public int $foo; public function __construct() { $this->foo = 2; } public function inc(): int { return $this->foo += 2; } } $ee = new Test(); Expected result: ---------------- no errors Actual result: -------------- 502 nginx error ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80805&edit=1

« previous php.bugs (#232406) next »