Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22545 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35997 invoked by uid 1010); 21 Mar 2006 13:28:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35981 invoked from network); 21 Mar 2006 13:28:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Mar 2006 13:28:07 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:45769] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A3/91-55982-56FFF144 for ; Tue, 21 Mar 2006 08:28:06 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id k2LDS2nZ019438; Tue, 21 Mar 2006 14:28:03 +0100 Date: Tue, 21 Mar 2006 14:27:39 +0100 (CET) X-X-Sender: derick@localhost To: Sara Golemon cc: PHP Developers Mailing List Message-ID: X-Face: "L'&?Ah3MYF@FB4hU'XhNhLB]222(Lbr2Y@F:GE[OO;"F5p>qtFBl|yVVA&D{A(g3[C}mG:199P+5C'v.M/u@Z\![0b:Mv.[l6[uWl' MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Streams/fgets problem From: derick@php.net (Derick Rethans) Hei! I found another little problem with streams today (in HEAD). The following script gives a nice assertion error: eof' failed. Aborted backtrace: Program received signal SIGABRT, Aborted. [Switching to Thread 1092242592 (LWP 21338)] 0x40f9a7c7 in raise () from /lib/tls/libc.so.6 (gdb) bt #0 0x40f9a7c7 in raise () from /lib/tls/libc.so.6 #1 0x40f9c06b in abort () from /lib/tls/libc.so.6 #2 0x40f93735 in __assert_fail () from /lib/tls/libc.so.6 #3 0x082ef4a8 in _php_stream_get_line (stream=0x8581b68, buf_type=6, buf={s = 0x0, u = 0x0, v = 0x0}, maxlen=0, maxchars=512, returned_len=0xbfffc91c) at /dat/dev/php/php-6.0dev/main/streams/streams.c:1115 #4 0x0824a094 in zif_fgets (ht=2, return_value=0x8572960, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /dat/dev/php/php-6.0dev/ext/standard/file.c:1005 #5 0x08356c0a in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffcb14) at zend_vm_execute.h:209 #6 0x0835c2a1 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfffcb14) at zend_vm_execute.h:1610 #7 0x08356762 in execute (op_array=0x85bee38) at zend_vm_execute.h:92 #8 0x0832ebbb in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /dat/dev/php/php-6.0dev/Zend/zend.c:1595 #9 0x082d9981 in php_execute_script (primary_file=0xbfffef34) at /dat/dev/php/php-6.0dev/main/main.c:1861 #10 0x083aacb5 in main (argc=2, argv=0xbffff054) at /dat/dev/php/php-6.0dev/sapi/cli/php_cli.c:1089 (gdb) frame 3 #3 0x082ef4a8 in _php_stream_get_line (stream=0x8581b68, buf_type=6, buf={s = 0x0, u = 0x0, v = 0x0}, maxlen=0, maxchars=512, returned_len=0xbfffc91c) at /dat/dev/php/php-6.0dev/main/streams/streams.c:1115 1115 assert(bufstart.v != NULL || !grow_mode || stream->eof); (gdb) print bufstart $1 = {s = 0x0, u = 0x0, v = 0x0} (gdb) print grow_mode $2 = 1 (gdb) print *stream $3 = {ops = 0x84a1160, abstract = 0x8578360, readfilters = {head = 0x0, tail = 0x0, stream = 0x8581b68}, writefilters = {head = 0x0, tail = 0x0, stream = 0x8581b68}, wrapper = 0x0, wrapperthis = 0x0, wrapperdata = 0x0, fgetss_state = 0, is_persistent = 0, mode = "r+", '\0' , rsrc_id = 5, in_free = 0, fclose_stdiocast = 0, stdiocast = 0x0, __exposed = 1, orig_path = 0x0, context = 0x8579308, flags = 0, input_encoding = 0x0, output_encoding = 0x0, position = 18, readbuf = { s = 0x85c6320 "220 power mailer\r\n", u = 0x85c6320, v = 0x85c6320}, readbuflen = 8192, readpos = 0, writepos = 0, chunk_size = 8192, eof = 0} regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org