ID:               32231
 User updated by:  bugs at niluje dot net
 Reported By:      bugs at niluje dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Debian linux x86
 PHP Version:      5.0.3
 New Comment:

i do not have the time or the expertise to compile php with debug
options.

the segfault happends in PEAR.php (PEAR 1.3.5) line 863

eval('$e = new Exception($this->message, $this->code);$e->PEAR_Error =
$this;throw($e);');

it appears that $e->PEAR_Error = $this causes the segfault.


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

[2005-03-24 18:41:15] [EMAIL PROTECTED]

Please read the above 2 comments I added. Read them very carefully..



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

[2005-03-24 18:40:25] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.



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

[2005-03-24 18:40:14] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



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

[2005-03-24 17:45:23] bugs at niluje dot net

here is a test case to trigger the segfault :

you need PEAR, DB, DB_Dataobject:


test.php
----------------------
<?php
        require_once 'PEAR.php';
        require_once 'DB/DataObject.php';
        PEAR::setErrorHandling(PEAR_ERROR_EXCEPTION);

        $config = parse_ini_file('dao.ini', TRUE);
        foreach($config as $class=>$values) {
                $options = &PEAR::getStaticProperty($class,
'options');
                $options = $values;
        }

        $options =
&PEAR::getStaticProperty('DB_DataObject','options');
        $options['class_prefix'] = '';
        $options['persistent'] = true;

        class Test extends DB_Dataobject
        {
                public $__table = 'test';
        }


        $dao = new Test();

        try {
                $dao->field1 = 'test';
                $dao->insert();
        }
        catch (Exception $e)
        {
                var_dump($e);
        }

?>
-----------


dao.ini
---------
[DB_DataObject]
debug = 1
database_test                   = mysqli://[EMAIL PROTECTED]/test
table_test                      = test
---------


gdb backtrace:
-----------
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#1  0xb577f00d in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#2  0xb577ee3f in url_adapt () from /usr/lib/apache/1.3/libphp5.so
#3  0xb57e5986 in zend_hash_apply_with_arguments () from
/usr/lib/apache/1.3/libphp5.so
#4  0xb577f0b7 in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#5  0xb577f1d6 in zif_var_dump () from /usr/lib/apache/1.3/libphp5.so
#6  0xb581b851 in zend_do_fcall_common_helper () from
/usr/lib/apache/1.3/libphp5.so
#7  0xb581bfd0 in zend_do_fcall_handler () from
/usr/lib/apache/1.3/libphp5.so
#8  0xb580024f in execute () from /usr/lib/apache/1.3/libphp5.so
#9  0xb57df043 in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp5.so
#10 0xb57a8c55 in php_execute_script () from
/usr/lib/apache/1.3/libphp5.so
#11 0xb5824755 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#12 0xb582537e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#13 0xb58253e5 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#14 0x080553c3 in ap_invoke_handler ()
#15 0x08068465 in ap_some_auth_required ()
#16 0x08068614 in ap_process_request ()
#17 0x08060bd2 in ap_child_terminate ()
#18 0x08060de7 in ap_child_terminate ()
#19 0x08060f10 in ap_child_terminate ()
#20 0x08061a9a in ap_child_terminate ()
#21 0x08061ff8 in main ()
------------------------

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

[2005-03-09 00:40:45] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Your example script gives me this output:

Parse error: syntax error, unexpected T_CATCH in Command line code on
line 1


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

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/32231

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

Reply via email to