ID: 38891
Updated by: [EMAIL PROTECTED]
Reported By: hannes dot magnusson at gmail dot com
-Status: Verified
+Status: Open
Bug Type: cURL related
Operating System: FreeBSD
PHP Version: 5CVS-2006-09-20 (CVS)
New Comment:
The segfault is fixed for now, but the driver returns wrong data, so
get_headers() still doesn't work with curlwrappers.
Previous Comments:
------------------------------------------------------------------------
[2006-09-20 07:05:02] hannes dot magnusson at gmail dot com
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 this bug report at http://bugs.php.net/?id=38891&edit=1