MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000176XdebugUsage problems (Wrong Results)public2006-05-01 06:442006-05-07 23:37
Reporterjudas_iscariote 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000176: segfault using SplTempFileObject
Descriptionxdebug 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 Informationlatest xdebug cvs, latest PHP 5.1-dev
TagsNo tags attached.
Operating Systemlinux 64 bit
PHP Version5.1-dev
Attached Files

- Relationships

-  Notes
(0000387)
judas_iscariote (reporter)
2006-05-01 06:49

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
(0000389)
judas_iscariote (reporter)
2006-05-01 07:58

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 [^]
(0000394)
judas_iscariote (reporter)
2006-05-01 21:01

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

but stills segfaults with xdebug loaded. :-(
(0000400)
derick (administrator)
2006-05-07 23:37

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 06:44 judas_iscariote New Issue
2006-05-01 06:49 judas_iscariote Note Added: 0000387
2006-05-01 07:58 judas_iscariote Note Added: 0000389
2006-05-01 21:01 judas_iscariote Note Added: 0000394
2006-05-07 23:37 derick Status new => closed
2006-05-07 23:37 derick Note Added: 0000400
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker