From: hannes dot magnusson at gmail dot com Operating system: FreeBSD PHP version: 5CVS-2006-09-20 (CVS) PHP Bug Type: cURL related Bug description: curlwrappers fail
Description: ------------ The following script fails --with-curlwrappers, works fine without them. Reproduce code: --------------- php -r 'get_headers("http://example.com"); get_headers("http://example.com");' Actual result: -------------- 5.1-cvs: FATAL: emalloc(): Unable to allocate 1515870811 bytes Segmentation fault: 11 (core dumped) #0 0x28c42a17 in kill () from /lib/libc.so.6 #1 0x08257fd9 in _emalloc (size=1515870811, __zend_filename=0x8356700 "/usr/src/php/5.1/Zend/zend_API.c", __zend_lineno=1149, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/src/php/5.1/Zend/zend_alloc.c:206 #2 0x082583ed in _estrndup (s=0x853d824 "\b", length=1515870810, __zend_filename=0x8356700 "/usr/src/php/5.1/Zend/zend_API.c", __zend_lineno=1149, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/src/php/5.1/Zend/zend_alloc.c:440 #3 0x082712c8 in add_next_index_stringl (arg=0x0, str=0x853d824 "\b", length=1515870810, duplicate=1) at /usr/src/php/5.1/Zend/zend_API.c:1149 #4 0x082018de in zif_get_headers (ht=1, return_value=0x853c7a4, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /usr/src/php/5.1/ext/standard/url.c:683 #5 0x08288b7d in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfe610) at zend_vm_execute.h:200 #6 0x082884e9 in execute (op_array=0x853f524) at zend_vm_execute.h:92 #7 0x082636b3 in zend_eval_string (str=0x853f524 "\004", retval_ptr=0x0, string_name=0x835f273 "Command line code") at /usr/src/php/5.1/Zend/zend_execute_API.c:1116 #8 0x0826384c in zend_eval_string_ex (str=0xbfbfea80 "get_headers(\"http://example.com\"); get_headers(\"http://example.com\");", retval_ptr=0x0, string_name=0x835f273 "Command line code", handle_exceptions=1) at /usr/src/php/5.1/Zend/zend_execute_API.c:1150 #9 0x082f49b4 in main (argc=3, argv=0xbfbfe958) at /usr/src/php/5.1/sapi/cli/php_cli.c:1182 5.2-cvs: PHP Fatal error: Out of memory (allocated 262144) at /usr/src/php/5.2/Zend/zend_API.c:1205 (tried to allocate 1515870811 bytes) in Command line code on line 1 /usr/src/php/5.2/main/streams/streams.c(386) : Stream of type 'MEMORY' 0x84f0aa4 (path:(null)) was not closed /usr/src/php/5.2/main/streams/streams.c(386) : Stream of type 'cURL' 0x84f07e4 (path:http://example.com) was not closed -- Edit bug report at http://bugs.php.net/?id=38891&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38891&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38891&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38891&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38891&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38891&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38891&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38891&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38891&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38891&r=support Expected behavior: http://bugs.php.net/fix.php?id=38891&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38891&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38891&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38891&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38891&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38891&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38891&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38891&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38891&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38891&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38891&r=mysqlcfg