ID:               37951
 Updated by:       [EMAIL PROTECTED]
 Reported By:      headhunter at c-plusplus dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:      5.1.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2006-06-28 18:14:47] headhunter at c-plusplus dot de

Description:
------------
Hello,

I have found a bug which crashes PHP when using
CURLOPT_FOLLOWLOCATION.
This happens on certain adresses only, the one specified in the example
later gives a crash.
Example line:
curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); // <<< CRASH
HERE


I don't know my configure line exactly. Anyway, I compiled PHP by hand
with--curl and --with-mysql and --with-cli. Rest is as untouched.

Unique to my systems where the problems I had getting mysql5 working.
It seems there is a bug in the configure Script of PHP which makes it
ignore the 64bit Libraries of mysql. I had to copy /usr/lib64/mysql to
/usr/lib/mysql to make compiling work.

The problem is indenpendant from the php.ini, I tried different one.
The default configuration also produces the crash. 

Reproduce code:
---------------
<?php

$curl_handle = curl_init();
$timeout = 10;

curl_setopt ($curl_handle,CURLOPT_URL, 'www.vipnet.at');
curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); // <<< CRASH
HERE

$buffer = curl_exec ($curl_handle);
print_r ($buffer);
?>

Expected result:
----------------
[EMAIL PROTECTED]:~> php bug.php
*** glibc detected *** free(): invalid pointer: 0x00002aaaab7dcb00 ***
Aborted


Actual result:
--------------
[EMAIL PROTECTED]:~> strace php bug.php
[ snip ]
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 4
writev(4, [{"*** glibc detected *** ", 23}, {"free(): invalid pointer",
23}, {": 0x", 4}, {"00002aaaab7dcb00", 16}, {" ***\n", 5}], 5*** glibc
detected *** free(): invalid pointer: 0x00002aaaab7dcb00 ***
) = 71
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(12461, 12461, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1

Reply via email to