From: wmeler at wp-sa dot pl
Operating system: RH 7.3
PHP version: 4CVS-2003-07-09 (stable)
PHP Bug Type: Network related
Bug description: streams SIG_SEGVs

Description:
------------
My application uses fsockopen. Since streams has been introduced I notice
SIG_SEGVs. As you can see below stack is corrupted and stream memory is
freed (if it is really it's memory)


(gdb) bt full
#0 _php_stream_flush (stream=Error accessing memory address 0xb71fd09c:
No such process.
) at /home/wmeler/rpm/BUILD/aris-1.6/php/main/streams.c:875
stream = (php_stream *) 0x4a9ce250
tsrm_ls = (void ***) 0x8779ef0
ret = 0
Error accessing memory address 0xb71fd094: No such process.
(gdb) print *(php_stream *) 0x4a9ce250
$1 = {ops = 0x4652c678, abstract = 0x1, filterhead = 0x10003, filtertail =
0x2a8fcc84,
wrapper = 0x5a5a5a5a, wrapperthis = 0x3d, wrapperdata = 0x4e6a3ec0,
fgetss_state = 135898848, is_persistent = 110,
mode = "\001", '\000' <repeats 11 times>, ": \a", rsrc_id = 1251795496,
in_free = 1,
fclose_stdiocast = 2, stdiocast = 0xcc840030, __exposed = 1515858575,
__orig_path = 0x5a5a5a5a <Error reading address 0x5a5a5a5a: No such
process>,
context = 0x31, flags = 1279301096, position = 1185939604,
readbuf = 0x5a5a5a5a <Error reading address 0x5a5a5a5a: No such
process>,
readbuflen = 1515870810, readpos = 1515870810, writepos = 1515870810,
chunk_size = 1515870810, eof = 1515870810}


--
Edit bug report at [url]http://bugs.php.net/?id=24557&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=24557&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=24557&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=24557&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=24557&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=24557&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=24557&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=24557&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=24557&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=24557&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=24557&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=24557&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=24557&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=24557&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=24557&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=24557&r=gnused[/url]