Edit report at https://bugs.php.net/bug.php?id=55339&edit=1

 ID:                 55339
 Updated by:         tony2...@php.net
 Reported by:        tomas dot brastavicius at quantum dot lt
 Summary:            Segfault with allow_call_time_pass_reference = Off
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Linux
 PHP Version:        5.3SVN-2011-08-01 (SVN)
-Assigned To:        
+Assigned To:        dmitry
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to