From:             vma1 at abv dot bg
Operating system: Slackware Linux 9.0
PHP version:      4CVS-2003-07-21 (stable)
PHP Bug Type:     Reproducible crash
Bug description:  Using a function that returns a reference crashes php

Description:
------------
The following code causes the apache 1.3.27 compiled statically with php
to crash. The apache process that tries to execute the script terminates
with a segfault. When the function returns the value not by reference
everything works OK.

These are my php.ini specific settings:

allow_call_time_pass_reference = Off
expose_php = Off
max_execution_time = 120     ; Maximum execution time of each script, in
seconds
error_reporting  =  E_ALL
display_startup_errors = On
log_errors = On
error_log = /usr/local/apache/logs/php_log
register_argc_argv = Off
magic_quotes_gpc = Off
always_populate_raw_post_data = On
upload_tmp_dir = /tmp
upload_max_filesize = 16M
; SMTP = localhost
; sendmail_from = [EMAIL PROTECTED]
sendmail_path = "/usr/local/sbin/ssmtp -t"


Reproduce code:
---------------
lass lala
{
        var $val;
        
        function lala ()
        {
                $this->val = 0;
        }
        
        function &get_val ()
        {
                $inf = 88;
                $this->val = $inf;
                return ($inf);
        }
}

$obj = new lala;
$vvv = &$obj->get_val ();
echo $obj->val;



-- 
Edit bug report at http://bugs.php.net/?id=24744&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24744&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24744&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24744&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24744&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24744&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24744&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24744&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24744&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24744&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24744&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24744&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24744&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24744&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24744&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24744&r=gnused

Reply via email to