|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28829 empty parameters cause crash
Submitted: 2004-06-18 14:36 UTC Modified: 2004-07-14 02:16 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: rashid at ds dot pg dot gda dot pl Assigned:
Status: Closed Package: BC math related
PHP Version: 5CVS-2004-06-18 (dev) OS: win 2k3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: rashid at ds dot pg dot gda dot pl
New email:
PHP Version: OS:


 [2004-06-18 14:36 UTC] rashid at ds dot pg dot gda dot pl
description in describes the problem well. there is also the same problem with bcsub. its reported again because the bug is still present in latest cvs build.

Reproduce code:
PEAR`s Benchmark_Timer::getProfiling():
//... this is part of loop - first settings of parameters are empty, and apache throws exception right away
$diff  = bcsub($time, $temp, 6);
$total = bcadd($total, $diff, 6);  

Actual result:
apache exception ['memory cannot be read']


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-28 01:19 UTC] rashid at ds dot pg dot gda dot pl
some more precise info
in above example: $total = $temp = 0

i tried other settings:
$total = $temp = '0' still caused error.
$total = $temp = '0.0' worked fine

hope this info helps - it looks like some kind of variable type conversion problems
 [2004-07-13 22:41 UTC] chris at leftbrained dot org
I'm still experiencing this issue, exactly as described, using a build from this mornings CVS.

I'm using Apache2 and Windows 2k Pro, with PHP compiled as a module, and lib_mysql and lib_mysqli in use.

I'm available for any tests that might be necessary, though I'm not comfortable compiling PHP on Windows.
 [2004-07-14 02:16 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 13:03:36 2021 UTC