ID:               21600
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Critical
 Bug Type:         Scripting Engine problem
 Operating System: Redhat 7.3, 8
 PHP Version:      4.3.0, 5.0.0
 New Comment:

I noticed this issue has something to do with the version of bison used
in a build.

Below is just my assumption:

1.28 => works
1.35 => works
1.75 => doesn't work
1.875 => ???





Previous Comments:
------------------------------------------------------------------------

[2003-01-23 16:44:49] [EMAIL PROTECTED]

Here is a simular problem - it seem to be a problem with referencing to
values from functions that not themselfs return reference.

<?php

class Person {

    var $name;

    function Person($name) {
        $this->name = $name;
        $wiefewfjwefjwefwef =& $this->getName(); // <-- this line
destroys $this->name and eventually crashes apache+php
    }
    
    function /*&*/ getName() {
        return $this->name;
    }
    
}

$kent =& new Person('Kent');

echo '<pre>'; print_r($kent); echo '</pre>';

echo '<p><b>PersonName: "' . $kent->getName() . '"</b></p>';


?>

------------------------------------------------------------------------

[2003-01-14 00:52:07] [EMAIL PROTECTED]

update version

------------------------------------------------------------------------

[2003-01-13 19:42:44] [EMAIL PROTECTED]

I'm marking this critical because the provided script works fine on the
previous released versions.


------------------------------------------------------------------------

[2003-01-13 01:21:08] [EMAIL PROTECTED]

backtrace (with php-5.0.0-dev):
#0  0x40749e49 in __sbrk (increment=1515880448) at
../sysdeps/generic/sbrk.c:33
#1  0x406e9d3c in __default_morecore (increment=1515880448)
    at ../sysdeps/generic/morecore.c:47
#2  0x406e676d in chunk_alloc (ar_ptr=0x40798520, nb=1515878480)
    at malloc.c:2583
#3  0x406e60bc in __libc_malloc (bytes=1515878476) at malloc.c:2817
#4  0x08256b63 in zend_mm_add_memory_block (heap=0x8333748, 
    block_size=1515878476) at
/dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:143
#5  0x08256de6 in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:236
#6  0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#7  0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#8  0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#9  0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#10 0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#11 0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)
    at /dat/dev/php/php-5.0.0dev/Zend/zend_mm.c:240
#12 0x08256e0e in zend_mm_alloc (heap=0x8333748, size=1515878448)

(last frame continues atleast 15.000 times)

Derick

------------------------------------------------------------------------

[2003-01-12 15:56:50] [EMAIL PROTECTED]

Verified with HEAD(ZE2) and PHP_4_3(ZE1).
The provided script causes segmentation fault.


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21600

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

Reply via email to