php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73480 php exit 127 on recursive function call
Submitted: 2016-11-08 17:52 UTC Modified: 2016-11-09 11:50 UTC
From: odigiman at gmail dot com Assigned:
Status: Closed Package: pthreads (PECL)
PHP Version: 7.0.12 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: odigiman at gmail dot com
New email:
PHP Version: OS:

 

 [2016-11-08 17:52 UTC] odigiman at gmail dot com
Description:
------------
Uncontrolled recursive function call triggers exit 127 on Windows instead of the expected out of memory fatal error. This does not occur on any Linux distributions I have tested.

Loaded extensions:
Core
bcmath
calendar
ctype
date
filter
hash
iconv
json
mcrypt
SPL
pcre
Reflection
session
standard
mysqlnd
tokenizer
zip
zlib
libxml
dom
PDO
openssl
SimpleXML
xml
wddx
xmlreader
xmlwriter
Weakref
curl
mysqli
sqlite3
sockets
mbstring
yaml
pthreads
Phar
com_dotnet
Zend OPcache

Test script:
---------------
<?php

function recursive(){
	recursive();
}

recursive();

Expected result:
----------------
Fatal error: Allowed memory size of xxxxx bytes exhausted (tried to allocate xxx bytes) in C:\Users\User\Desktop\recursive.php

Actual result:
--------------
php.exe: Exit 127

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-09 10:59 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-11-09 10:59 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2016-11-09 11:50 UTC] odigiman at gmail dot com
-Status: Feedback +Status: Closed -Package: Reproducible crash +Package: pthreads
 [2016-11-09 11:50 UTC] odigiman at gmail dot com
Identified that this issue is caused by pthreads. Seems related to https://bugs.php.net/bug.php?id=72568 (updated php 7.0.12 on Linux produces the behaviour described in that issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 08:01:28 2024 UTC