php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42531 Too many curl_copy_handle() calls causes a crash
Submitted: 2007-09-03 13:06 UTC Modified: 2007-11-24 01:00 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nicolac76 at yahoo dot fr Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.2.4 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicolac76 at yahoo dot fr
New email:
PHP Version: OS:

 

 [2007-09-03 13:06 UTC] nicolac76 at yahoo dot fr
Description:
------------
If we doing a for on a curl_multi_add_handle, Apache shut down without reason...
We can do 127 time, but no 128 (0111 111b)...
The problem come from the function not from the variable $i !

Reproduce code:
---------------
<?
$mh=curl_multi_init();
$ch = curl_init('http://www.example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
for($i = 1; $i <= 128; $i++)
{
 $conn[$i] = curl_copy_handle($ch);
 curl_multi_add_handle ($mh,$conn[$i]);
}
...
?>

Expected result:
----------------
No error

Actual result:
--------------
An error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-03 13:29 UTC] jani@php.net
I just have to ask: WHY do you do something like this anyway?!
 [2007-09-03 13:46 UTC] nicolac76 at yahoo dot fr
I change only the post options...
I need too read many time the same page with different post...
 [2007-11-16 14:23 UTC] jani@php.net
Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I fixed a related bug in curl_copy_handle(), please try the snapshot to see if it caused this bug too.
 [2007-11-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC