Bug #70675 [NEW]: Fatal error: Allowed memory size:zend_execute.c:151

From: Date: Fri, 09 Oct 2015 07:57:02 +0000
Subject: Bug #70675 [NEW]: Fatal error: Allowed memory size:zend_execute.c:151
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196476@lists.php.net to get a copy of this message
From: maartensc at gmail dot com Operating system: FreeBSD 10.1-RELEASE PHP version: 7.0.0RC4 Package: Class/Object related Bug Type: Bug Bug description:Fatal error: Allowed memory size:zend_execute.c:151 Description: ------------ Good day, I actually have PHP 7.1.0-dev version compiled from GIT. I used the following to compile: ./configure --enable-fpm --with-pdo-mysql --with-pear --with-openssl --with-curl --with-mcrypt --with-zlib --enable-zip --with-png-dir --with-jpeg-dir --with-config-file-path=/usr/local/php --enable-debug --enable-maintainer-zts --enable-cgi --enable-cli PHP 7.1.0-dev (cli) (built: Oct 8 2015 14:00:51) ( ZTS DEBUG ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies nginx version: nginx/1.8.0 When I run my simplified script below I get the following error. PHP Fatal error: Allowed memory size of 134217728 bytes exhausted at /root/php-src/Zend/zend_execute.c:151 (tried to allocate 262176 bytes) in /usr/local/www/dev/Logs/test.php on line 4 Fatal error: Allowed memory size of 134217728 bytes exhausted at /root/php-src/Zend/zend_execute.c:151 (tried to allocate 262176 bytes) in /usr/local/www/dev/Logs/test.php on line 4 The dev machine has 1GB of memory. Memory usage details below. root@devwebserver:/usr/local/www/dev/Logs # vmstat procs memory page disks faults cpu r b w avm fre flt re pi po fr sr da0 cd0 in sy cs us sy id 0 0 19 1749M 235M 69 0 0 0 80 3 0 0 2 191 88 0 0 100 The above error shows from CLI and when doing request via NGINX -> PHP-FPM. I have really simplified my script to replicate this issue and as is it might not make too much sense to use this as is. Test script: --------------- <?php class BaseController{ public function __call(string $Action, array $Data){ if (method_exists($this, $Action . "Action")) { } elseif (method_exists($this, "DefaultAction") and $this->DefaultAction($Action, $Data)) { exit; } } } class TestPage extends BaseController{ private function DefaultAction(string $Action, array $Data): bool{ return false; } } $testpage = new TestPage(); $testpage->Show(); Expected result: ---------------- Currently the output for this script should be nothing. Actual result: -------------- root@webserver:/usr/local/www/dev/Logs # gdb php GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run /usr/local/www/dev/Logs/test.php Starting program: /usr/local/bin/php /usr/local/www/dev/Logs/test.php [New LWP 100084] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted at /root/php-src/Zend/zend_execute.c:151 (tried to allocate 262176 bytes) in /usr/local/www/dev/Logs/test.php on line 4 Fatal error: Allowed memory size of 134217728 bytes exhausted at /root/php-src/Zend/zend_execute.c:151 (tried to allocate 262176 bytes) in /usr/local/www/dev/Logs/test.php on line 4 Program exited with code 0377. (gdb) bt No stack. (gdb) -- Edit bug report at https://bugs.php.net/bug.php?id=70675&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70675&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70675&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70675&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70675&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70675&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70675&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70675&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70675&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70675&r=support Expected behavior: https://bugs.php.net/fix.php?id=70675&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70675&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70675&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70675&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70675&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70675&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70675&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70675&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70675&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70675&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70675&r=mysqlcfg

« previous php.bugs (#196476) next »