Bug #55339 [Fbk]: Segfault with allow_call_time_pass_reference = Off
| From: | pajoye@php.net | Date: | Mon, 01 Aug 2011 20:58:46 +0000 |
| Subject: | Bug #55339 [Fbk]: Segfault with allow_call_time_pass_reference = Off | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162345@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55339&edit=1
ID: 55339
Updated by: pajoye@php.net
Reported by: tomas dot brastavicius at quantum dot lt
Summary: Segfault with allow_call_time_pass_reference = Off
Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Linux
PHP Version: 5.3SVN-2011-08-01 (SVN)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006210e7 in ?? ()
(gdb) bt
#0 0x00000000006210e7 in ?? ()
No, the debug mode was not used sorry. the ?? are here to say that gdb has no
idea about the symbols.
Previous Comments:
------------------------------------------------------------------------
[2011-08-01 20:50:04] tomas dot brastavicius at quantum dot lt
@pajoye@php.net
I did. I have made a mistake in a bug report. The following configuration was used: ./configure
--disable-all --enable-debug.
I was able to reproduce this issue on 3 separate servers.
------------------------------------------------------------------------
[2011-08-01 20:31:13] pajoye@php.net
The symbols are missing so the backtrace is rather useless. Compile php with --
enable-debug to get them.
------------------------------------------------------------------------
[2011-08-01 19:47:31] tomas dot brastavicius at quantum dot lt
Description:
------------
The scripts that are provided below causes segfault. The following configuration was used to compile
PHP:
./configure --disable-all
Test script:
---------------
To reproduce the bug one needs 3 PHP files:
1. index.php
<?php
function error_handler($errno, $errstr, $errfile, $errline)
{
require_once 'error_handler.php';
}
set_error_handler('error_handler');
require_once('inc.php');
echo 'Never prints';
2. error_handler.php
<?php
// The file may be empty. It's OK.
3. inc.php
<?php
function foo()
{
$array = array();
foreach ($array as $key => $value) {
bar($key, &$value);
}
}
function bar()
{
}
Before running index.php be sure allow_call_time_pass_reference is Off
Expected result:
----------------
Never prints
Actual result:
--------------
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006210e7 in ?? ()
(gdb) bt
#0 0x00000000006210e7 in ?? ()
#1 0x0000000100000000 in ?? ()
#2 0x00007f3a4a29d390 in ?? ()
#3 0x0000000000000000 in ?? ()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55339&edit=1