[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/27888] Arrays.binarySearch broken for large arrays
From: |
kaz at maczuka dot gcd dot org |
Subject: |
[Bug classpath/27888] Arrays.binarySearch broken for large arrays |
Date: |
7 Jun 2006 00:10:44 -0000 |
------- Comment #3 from kaz at maczuka dot gcd dot org 2006-06-07 00:10 -------
Although I am in favor of changing ">>" to ">>>", this fix reminds me of the
Y2K problem fixes. This fix is valid while (low + hi) < 2^32, but what if (low
+ hi) >= 2^32? Y2K problem fixes of changing the date format from yy to yyyy
is valid until the year 9999, but what if the year 10000 comes? "mid = low +
((hi - low) >> 1)" would be a safer fix, but I will not insist that we should
do this way because the "what if" questions above are beyond my imagination.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27888
- [Bug classpath/27888] New: Arrays.binarySearch broken for large arrays, green at redhat dot com, 2006/06/04
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, green at redhat dot com, 2006/06/04
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, tromey at gcc dot gnu dot org, 2006/06/04
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, tromey at gcc dot gnu dot org, 2006/06/04
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays,
kaz at maczuka dot gcd dot org <=
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, kaz at maczuka dot gcd dot org, 2006/06/07
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, tromey at gcc dot gnu dot org, 2006/06/09
- [Bug classpath/27888] Arrays.binarySearch broken for large arrays, cvs-commit at developer dot classpath dot org, 2006/06/09