#34420 [NEW]: Problem with negative exponent handling
| From: | blucasco at gmail dot com | Date: | Thu, 08 Sep 2005 04:47:25 +0000 |
| Subject: | #34420 [NEW]: Problem with negative exponent handling | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84671@lists.php.net to get a copy of this message | ||
From: blucasco at gmail dot com
Operating system: i386 SuSE 9.1 Pro
PHP version: 5CVS-2005-09-08 (CVS)
PHP Bug Type: Reproducible crash
Bug description: Problem with negative exponent handling
Description:
------------
This code causes seg fault on any version of PHP 5, including newest CVS
build (php5-200509080230).
Are there threading issues? Is curl_multi not reliable?
I seem unable to test with --enable-thread-safety or
--enable-experimental-zts (doesn't compile in properly) so I can't
confirm.
Reproduce code:
---------------
<?php
$connomains = array(
"http://www.cnn.com/",
"http://www.canada.com/",
"http://www.yahoo.com/"
);
while(1) {
$mh = curl_multi_init();
foreach ($connomains as $i => $url) {
$conn[$i] = curl_init($url);
curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
curl_multi_add_handle ($mh,$conn[$i]);
}
// start performing the request
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
while ($active and $mrc == CURLM_OK) {
// wait for network
if (curl_multi_select($mh) != -1) {
// pull in any new data, or at least handle timeouts
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
}
}
if ($mrc != CURLM_OK) {
print "Curl multi read error $mrc\n";
}
// retrieve data
foreach ($connomains as $i => $url) {
if (($err = curl_error($conn[$i])) == '') {
$res[$i]=curl_multi_getcontent($conn[$i]);
} else {
print "Curl error on handle $i: $err\n";
}
curl_multi_remove_handle($mh,$conn[$i]);
curl_close($conn[$i]);
}
curl_multi_close($mh);
print_r($res);
}
?>
Expected result:
----------------
Expected: continous loop after everything is properly closed.
Actual result:
--------------
Segmentation fault
--
Edit bug report at http://bugs.php.net/?id=34420&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34420&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34420&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34420&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34420&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34420&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34420&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34420&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34420&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34420&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34420&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34420&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34420&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34420&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34420&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34420&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34420&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34420&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34420&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34420&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34420&r=mysqlcfg