View Issue Details

IDProjectCategoryView StatusLast Update
0000176XdebugUncategorizedpublic2006-05-07 22:37
Reporterjudas_iscariote Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Summary0000176: segfault using SplTempFileObject
Description

xdebug segfaults using SplTempFileObject

<?php
$crap = new SplTempFileObject('foo');
$crap->fwrite('give me a crash');
?>

expected result:

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplTempFileObject::construct() expects parameter 1 to be long, string given' in /srv/www/htdocs/temp.php:3
Stack trace:
#0 /srv/www/htdocs/temp.php(3): SplTempFileObject->
construct('foo')
#1 {main}

actual result :

Segmentation fault (core dumped)

Additional Information

latest xdebug cvs, latest PHP 5.1-dev

TagsNo tags attached.
Operating Systemlinux 64 bit
PHP Version5.1-dev

Activities

judas_iscariote

2006-05-01 05:49

reporter   ~0000387

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912513283232 (LWP 13447)]
0x000000000050ee13 in _php_stream_write (stream=0x0, buf=0x985678 "give me a crash", count=15)
at /usr/src/debug/php-5.1.2/main/streams/streams.c:1012
1012 if (buf == NULL || count == 0 || stream->ops->write == NULL) {
(gdb) bt
#0 0x000000000050ee13 in _php_stream_write (stream=0x0, buf=0x985678 "give me a crash", count=15)
at /usr/src/debug/php-5.1.2/main/streams/streams.c:1012
#1 0x0000000000487a45 in zif_spl_SplFileObject_fwrite (ht=<value optimized out>, return_value=0x985578,
return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, return_value_used=<value optimized out>)
at /usr/src/debug/php-5.1.2/ext/spl/spl_directory.c:1861
0000002 0x00002aaaabb16e46 in xdebug_execute_internal (current_execute_data=0x7fffffca0860, return_value_used=0)
at /home/cristian/xdebug/xdebug.c:1428
0000003 0x000000000055a1d7 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffca0860) at zend_vm_execute.h:202
0000004 0x0000000000559993 in execute (op_array=0x983aa8) at zend_vm_execute.h:92
0000005 0x00002aaaabb16b05 in xdebug_execute (op_array=0x983aa8) at /home/cristian/xdebug/xdebug.c:1366
0000006 0x000000000053d23c in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
at /usr/src/debug/php-5.1.2/Zend/zend.c:1109
0000007 0x00000000004ff84c in php_execute_script (primary_file=0x7fffffca2fc0) at /usr/src/debug/php-5.1.2/main/main.c:1732
0000008 0x00000000005ce045 in main (argc=2, argv=0x7fffffca3178) at /usr/src/debug/php-5.1.2/sapi/cli/php_cli.c:1092

judas_iscariote

2006-05-01 06:58

reporter   ~0000389

don't know if it is related , but I opened a PHP bug due to other issue with
SplTempFileObject (xdebug unloaded)

http://bugs.php.net/bug.php?id=37257

judas_iscariote

2006-05-01 20:01

reporter   ~0000394

fixed the mentioned PHP bug, I recompiled PHP. and without xdebug it works as expected now.

but stills segfaults with xdebug loaded. :-(

derick

2006-05-07 22:37

administrator   ~0000400

Fixed in CVS. The cause was that Xdebug didn't understand the EH_THROW error mode yet.

Issue History

Date Modified Username Field Change
2006-05-01 05:44 judas_iscariote New Issue
2006-05-01 05:49 judas_iscariote Note Added: 0000387
2006-05-01 06:58 judas_iscariote Note Added: 0000389
2006-05-01 20:01 judas_iscariote Note Added: 0000394
2006-05-07 22:37 derick Status new => closed
2006-05-07 22:37 derick Note Added: 0000400
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized