|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-03-29 15:43 UTC] patrick at rap-x dot com
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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
update the function getProfiling() in timer.php as the follows, maybe you can fix the bug. function getProfiling() { $i = 0; $total = $temp = '0.0'; $result = array(); foreach ($this->markers as $marker => $time) { if (extension_loaded('bcmath')) { $diff = bcsub($time, $temp, 6); if ($i > 0) $total = bcadd($total, $diff, 6); } else { $diff = $time - $temp; $total = $total + $diff; } echo "$time $diff $total <br>"; $result[$i]['name'] = $marker; $result[$i]['time'] = $time; $result[$i]['diff'] = $diff; $result[$i]['total'] = $total; $this->strlen_max = (strlen($marker) > $this->strlen_max ? strlen($marker) + 1 : $this->strlen_max); $temp = $time; $i++; } $result[0]['diff'] = '-'; $this->strlen_max = (strlen('total') > $this->strlen_max ? strlen('total') : $this->strlen_max); $this->strlen_max += 4; return $result; }