Bug #69693 [NEW]: Reproducible Corruption on Variables
| From: | bugs at tmarques dot com | Date: | Fri, 22 May 2015 18:39:06 +0000 |
| Subject: | Bug #69693 [NEW]: Reproducible Corruption on Variables | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192830@lists.php.net to get a copy of this message | ||
From: bugs at tmarques dot com
Operating system: Linux x32
PHP version: 5.5.25
Package: *General Issues
Bug Type: Bug
Bug description:Reproducible Corruption on Variables
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 bug report at https://bugs.php.net/bug.php?id=69693&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69693&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69693&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69693&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69693&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69693&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69693&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69693&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69693&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69693&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69693&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69693&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69693&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69693&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69693&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69693&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69693&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69693&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69693&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69693&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69693&r=mysqlcfg