From:             [EMAIL PROTECTED]
Operating system: Debian 3.0 (Woody)
PHP version:      4.1.0
PHP Bug Type:     Reproducible crash
Bug description:  SegFault when passing HTTP_SESSION_VARS

The following script always produces a segmentation fault on verison 4.1.0:
 

<?
session_start();
$bar = foo($HTTP_SESSION_VARS);

function foo() {
        global $HTTP_SESSION_VARS;
        return true;
}
?>
<h1>Test is complete</h1>

The problem goes away if you remove the session array as a parameter to the
foo() function (which is not expecting any parameters anyway).  The problem
also goes away if you remove the "global" declaration inside the foo()
function.  No errors or warning are generated when the function call
occurs.  

Granted, this code snippet looks very odd (why would anyone want to pass
HTTP_SESSION_VARS, for example), but was the quickest (least lines of code)
way to set up the conditions that will always force the error.  The problem
also occurs if you try to pass the new _SESSION array and still reference
the older HTTP_SESSION_VARS in the function.

Reigster_globals is off.  Error_level is set to E_ALL.  Apache version is
1.3.22-5.



-- 
Edit bug report at: http://bugs.php.net/?id=14834&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to