Bug #65450 [Fbk->NoF]: PHP 5.3.27 segfaults during shutdown
| From: | php-bugs at lists dot php dot net | Date: | Sun, 11 Apr 2021 04:22:10 +0000 |
| Subject: | Bug #65450 [Fbk->NoF]: PHP 5.3.27 segfaults during shutdown | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233351@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65450&edit=1
ID: 65450
Updated by: php-bugs@lists.php.net
Reported by: jakub dot lopuszanski at nasza-klasa dot pl
Summary: PHP 5.3.27 segfaults during shutdown
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: CGI/CLI related
Operating System: linux
PHP Version: Irrelevant
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-03-31 10:22:29] cmb@php.net
Is that still an issue for you with any of the actively supported
PHP versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2013-08-14 15:52:27] jakub dot lopuszanski at nasza-klasa dot pl
Description:
------------
Follwing script outputs
"""
X
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
72 bytes) in /home/jlopuszanski/test.php on line 8
B
Segmentation fault
"""
on php 5.3.27.
The problem is quite difficult to reproduce, as it greately depends on the
filename, length of arguments etc.
Therefore I run it in a loop with different length of an argument passed to the
script.
Sometimes uncommenting the line with echo "Y\n"; (even though it is obviously
unreachable) helps to cause the error.
Sometimes I have to use ~/test.php or ./test.php instead of test.php as a
filename to trigger the Segfault.
Once I find a good combination of filename and arguments, the problem is
persistent and can be reproduced 100% of times for that combination.
Test script:
---------------
cat test.php
<?php
class A{
function __construct(){
register_shutdown_function(array(__CLASS__, 'handle_shutdown'));
echo "X\n";
while(1){
$t[]=new B();
}
// echo "Y\n";
}
static public function handle_shutdown(){
echo "B\n";
$b=new B();
$b=null;
}
}
class B{
}
$a=new A();
?>
for((n=0;n<100;++n));
do
echo $n;
php-5.3.27/bin/php ~/test.php
for((i=0;i<n;++i));do echo -n a;done;
done
Expected result:
----------------
X
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
72 bytes) in /home/jlopuszanski/test.php on line 8
B
Actual result:
--------------
X
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
72 bytes) in /home/jlopuszanski/test.php on line 8
B
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65450&edit=1