PHP :: Bug #51008 :: Zend/tests/bug45877.phpt fails

Bug #51008 Zend/tests/bug45877.phpt fails
Submitted: 2010-02-11 01:54 UTC Modified: 2010-10-05 13:29 UTC
From: geissert at debian dot org Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3SVN-2010-02-12 OS: debian sid
Private report: No CVE-ID: None

 [2010-02-11 01:54 UTC] geissert at debian dot org

Description:
------------
The test fails 

Reproduce code:
---------------
<?php
$keys = array(PHP_INT_MAX,
        (string) PHP_INT_MAX,
        (string) (-PHP_INT_MAX - 1),
        -PHP_INT_MAX - 1,
        (string) (PHP_INT_MAX + 1));

var_dump(array_fill_keys($keys, 1));
?>


Expected result:
----------------
array(2) {
  [2147483647]=>
  int(1)
  [-2147483648]=>
  int(1)
  ["2147483648"]=>
  int(1)
}


Actual result:
--------------
array(2) {
  [2147483647]=>
  int(1)
  [-2147483648]=>
  int(1)
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2010-02-12 17:02 UTC] jani@php.net

In what kind of environment does it fail? It works fine for me in both 32bit and 64bit systems. (using latest SVN checkout of course :)

 [2010-02-12 18:58 UTC] geissert at debian dot org

It fails for me with 5.3.1 on i686, ia64, s390, alpha, powerpc, x86_64, etc. Even on those running kfreebsd.
It also fails with the latest 5.3 svn on ia64 (haven't built it on any other arch.)

 [2010-02-22 23:47 UTC] geissert@php.net

Indeed. I just checked with the -O0 build and it passes.

The affected code in this case is ZEND_HANDLE_NUMERIC in Zend/zend_hash.h

Should this one be assigned to somebody in particular?

 [2010-10-05 13:29 UTC] dmitry@php.net

-Status: Assigned +Status: Closed

 [2010-10-05 13:29 UTC] dmitry@php.net

This bug has been fixed in SVN.

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