Bug #69693 [Com]: Reproducible Corruption on Variables

From: Date: Fri, 22 May 2015 18:47:44 +0000
Subject: Bug #69693 [Com]: Reproducible Corruption on Variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192831@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69693&edit=1

 ID:                 69693
 Comment by:         bugs at tmarques dot com
 Reported by:        bugs at tmarques dot com
 Summary:            Reproducible Corruption on Variables
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   Linux x32
 PHP Version:        5.5.25
 Block user comment: N
 Private report:     N

 New Comment:

P.S. I would look into this further but have no idea where to look for the problem or how to debug
PHP internal's. Looking for some input and happy to help with testing in any way I can.


Previous Comments:
------------------------------------------------------------------------
[2015-05-22 18:39:05] bugs at tmarques dot com

Description:
------------
This is a bug I ran into when using Wordpress normally. After running a script for a while on a x32
ABI php, it enters an infinite loop that exhausts process memory. Upon investigation, two variables
that have integers get summed and return a float. Depending on the input text, the loop doesn't
trigger the bug.

This doesn't happen on i386/i686, haven't tested on x86-64.

Test script:
---------------
Please see both examples at: 

https://gist.github.com/anonymous/4320f460cd1e4144df2a

Relevant code is "run.php" from lines 96 to 120.

It never triggers if I copy the $text variable to another one that's not even used ($_test).
It also returns the correct sum for a test in the code as:

if ( is_float( $i + $l ) === TRUE )

So I have to sum and check if the value is big (it usually returns some float of E+18 magnitude).



Expected result:
----------------
Integer variables sum and result in an integer.

Actual result:
--------------
Sum of two integers returns a float.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69693&edit=1


Thread (12 messages)

« previous php.bugs (#192831) next »