|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-02-26 20:01 UTC] requinix@php.net
-Status: Open
+Status: Verified
-Package: FPM related
+Package: opcache
[2021-03-01 14:11 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2021-03-01 14:11 UTC] nikic@php.net
[2021-03-01 14:14 UTC] nikic@php.net
[2021-03-01 14:14 UTC] nikic@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 00:00:01 2025 UTC |
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