Re: [PHP4BETA] reading from stdin/thread safe

From: Date: Sun, 26 Sep 1999 21:48:17 +0000
Subject: Re: [PHP4BETA] reading from stdin/thread safe
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4944@lists.php.net to get a copy of this message
On Sun, Sep 26, 1999 at 10:38:31PM +0200, Sascha Schumann wrote: > Hi, > > the thread-safe CGI version always crashes, if no input file > is specified (i.e. when stdin is used). > > This is a 100% "portable" behaviour (tested under FreeBSD, > Linux, Solaris). file_handle->handle.is->ios is trash, hence ->fail() segfaults in zend-scanner.l:246. (gdb) bt #0 0x12002b170 in open_file_for_scanning (file_handle=0x11ffff530, compiler_globals=0x1201ff770) at /usr/lib/gcc-lib/alphaev56-unknown-linux-gnu/2.95.1/../../../../include/g++-3/streambuf.h:219 -> int fail() const { return _state & (ios::badbit|ios::failbit); } #1 0x12002b51c in v_compile_files (mark_as_ref=0, compiler_globals=0x1201ff770, file_count=3, files={ __base = 0x11ffff420 "Xöÿ\037\001", __offset = 40}) at /home/sas/new2/aol/../php4/libzend/zend-scanner.l:297 #2 0x12002b420 in compile_files (mark_as_ref=0, compiler_globals=0x1201ff770, file_count=539062176) at /home/sas/new2/aol/../php4/libzend/zend-scanner.l:271 #3 0x12001eff4 in php_execute_script (primary_file=0x11ffff530, compiler_globals=0x1201ff770, executor_globals=0x120200000, core_globals=0x1202011b0) at ../php4/main.c:1167 #4 0x120027f78 in main (argc=1, argv=0x11ffff658) at ../php4/cgi_main.c:470 #5 0x20000a1fea4 in __libc_start_main () (gdb) p file_handle->handle $3 = {fd = 538831688, fp = 0x1201deb48, is = 0x1201deb48} (gdb) p *file_handle->handle.is $5 = {<ios> = <invalid address>, _vb.ios = 0x0, _gcount = 0} -- Regards, Sascha Schumann Consultant

« previous php.version4 (#4944) next »