*= operator broken on Mac OS X and Windows [crit bug #23395]
php.internals
Edin Kadribasic
23 years ago
The following piece of code
$i = 1;
$i *= 10;
echo $i;
prints -2123890688 on Mac OS X, and 0 on Windows.
The following commit is where breakage occured:
http://cvs.php.net/diff.php/Zend/zend_operators.c?r1=1.129.2.1&r2=1.129.2.2&ty=u
I suggest for this patch to be reverted since the commit message
reads "Speed up, simplify, use ZEND_SIGNED_MULTIPLY_LONG in
mul_operation" which doesn't sound like a bug fix that should be in
the stable branch.
Edin
Wez Furlong
23 years ago
This patch corrects the problem by not destroying the op1 value during
multiplication.
--Wez.
On Tue, 29 Apr 2003, Edin Kadribasic wrote:
Sascha Schumann
23 years ago
On Tue, 29 Apr 2003, Wez Furlong wrote:
> This patch corrects the problem by not destroying the op1 value during
> multiplication.