#27759 [NEW]: bcadd() causes crash if first parameter is empty string
| From: | patrick at rap-x dot com | Date: | Mon, 29 Mar 2004 20:43:37 +0000 |
| Subject: | #27759 [NEW]: bcadd() causes crash if first parameter is empty string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-57051@lists.php.net to get a copy of this message | ||
From: patrick at rap-x dot com
Operating system: Windows XP
PHP version: 5.0.0RC1
PHP Bug Type: Reproducible crash
Bug description: bcadd() causes crash if first parameter is empty string
Description:
------------
The following code causes PHP5 RC1 (module)/ WINXP / Apache2 to crash.
The same code doesn't cause a crash on PHP 4.3.4 / WINXP/ IIS (CGI)
Fault discovered by using PEAR :: Benchmark
Workaround is to mess around line 230ish in pear Timer.php so that the
bcadd is not called.
Reproduce code:
---------------
$total = "0";
$diff = "";
bcadd($total, $diff, 6);
Expected result:
----------------
n/a
Actual result:
--------------
Apache2 crashes
Windows Event Log records:
Faulting application Apache.exe, version 2.0.49.0, faulting module
php5ts.dll, version 5.0.0.0, fault address 0x0003c773.
Apache error log:
Parent: child process exited with status 3221225477 -- Restarting.
[notice] Parent: Created child process 2120
[notice] Child 2120: Child process is running
[notice] Child 2120: Acquired the start mutex.
[notice] Child 2120: Starting 250 worker threads.
[notice] Parent: Created child process 2120
[notice] Child 2120: Child process is running
[notice] Child 2120: Acquired the start mutex.
[notice] Child 2120: Starting 250 worker threads.
[notice] Parent: child process exited with status 2147483649 --
Restarting.
--
Edit bug report at http://bugs.php.net/?id=27759&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27759&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27759&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27759&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27759&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27759&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27759&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27759&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27759&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27759&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27759&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27759&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27759&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27759&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27759&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27759&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27759&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27759&r=float