|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79094 Crashing when running recursion function
Submitted: 2020-01-10 11:56 UTC Modified: 2020-01-10 14:22 UTC
From: vinayrachapalli7 at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.4Git-2020-01-10 (Git) OS: centos 7
Private report: No CVE-ID: None
 [2020-01-10 11:56 UTC] vinayrachapalli7 at gmail dot com
It crashes when we run the following script on PHP 7.4, but in 7.3, it'll through error like Fatal error: Allowed memory size of 134217728 bytes exhausted at ...

Test script:
function A(){



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-10 12:27 UTC]
-Status: Open +Status: Verified -Package: PHP Language Specification +Package: Scripting Engine problem
 [2020-01-10 14:22 UTC]
-Assigned To: +Assigned To: dmitry
 [2020-01-10 14:22 UTC]
The problem here is that we don't SAVE_OPLINE in all places where an OOM condition might occur -- and I doubt we want to.

However, in 7.4 EX(opline) is no longer initialized at all (until a SAVE_OPLINE in a throwing opcode), which means that we may crash when trying to fetch the current line number on OOM.

I think that we should bring back EX(opline) initialization in init_func_execute_data. @dmitry: Do you see any other way?
 [2020-01-31 07:35 UTC]
Automatic comment on behalf of
Log: Fixed bug #79094 (Crashing when running recursion function)
 [2020-01-31 07:35 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Mar 31 08:01:26 2020 UTC