PHP 4.0 Bug #2916: segfault on file($someurl) and odd response

From: Date: Sat, 04 Dec 1999 23:58:27 +0000
Subject: PHP 4.0 Bug #2916: segfault on file($someurl) and odd response
Groups: php.dev 
Request: Send a blank email to php-dev+get-13446@lists.php.net to get a copy of this message
From: sroberts@snap.com Operating system: Solaris 2.5.1 PHP version: 4.0 Latest CVS (04/12/1999) PHP Bug Type: Reproduceable crash Bug description: segfault on file($someurl) and odd response Both symptoms come from trivial test program : <?php $foo = file("http://www.snap.com/"); echo "<pre>" . htmlspecialchars($foo[0]) . "</pre>"; ?> Symptom 1 : For most URLs it reports Warning: Invalid URL specified, http://www.snap.com/ in /home/simonr/public_html/testget.php on line 5 There's nothing wrong with the URL. Symptom 2 : Sometimes A couple of times it took a long time (30s?) before segfaulting apache : I can't seem to reproduce it reliably, but here's the backtrace from one instance if it helps... (gdb) bt #0 0xef620cdc in seg3 () #1 0x4d194 in _emalloc (size=10439360, __zend_filename=0x20e2c8 "", __zend_lineno=16, __zend_orig_filename=0x1020e2c0 "", __zend_orig_lineno=48) at zend_alloc.c:153 #2 0x4d750 in _estrndup (s=0xef8222f8 "", length=278839264, __zend_filename=0x1625e0 "url.c", __zend_lineno=111, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:279 #3 0xa4634 in url_parse (string=0x20e2d8 "http://palladium:11000/~simonr/links.html") at url.c:111 #4 0x4a164 in php3_fopen_url_wrapper (path=0x20e2d8 "http://palladium:11000/~simonr/links.html", mode=0x15f9e0 "r", options=4, issock=0xefffd03c, socketd=0xefffd038, opened_path=0x0) at fopen-wrappers.c:450 #5 0x49cd0 in php3_fopen_wrapper (path=0x20e2d8 "http://palladium:11000/~simonr/links.html", mode=0x15f9e0 "r", options=4, issock=0xefffd03c, socketd=0xefffd038, opened_path=0x0) at fopen-wrappers.c:193 #6 0x825b4 in php3_file (ht=-8212, return_value=0xeffff0e0, list=0x1d3e58, plist=0x1d3e84, this_ptr=0x0, return_value_used=1) at file.c:538 #7 0xc2c50 in execute (op_array=0x211128) at zend_execute.c:1476 #8 0x47478 in php_execute_script (primary_file=0xeffff6d8) at main.c:1226 #9 0x63dec in apache_php_module_main (r=0x201f28, fd=19, display_source_mode=0) at sapi_apache.c:88 #10 0x452f4 in send_php () #11 0x4534c in send_parsed_php () #12 0xd1b5c in ap_invoke_handler () #13 0xedfa0 in process_request_internal () #14 0xee024 in ap_process_request () #15 0xe1bf8 in child_main () #16 0xe1f84 in make_child () #17 0xe20a8 in startup_children () #18 0xe2a98 in standalone_main () #19 0xe3680 in main ()

« previous php.dev (#13446) next »