Re:Mozilla pays 12-year-old San Jose boy for hunting bugs in...
by edanm on Saturday October 23, 2010 @07:54AM
(#1823275)
These stories always make me think of another bug that is unbelievable.
The bug is in Binary Search - one of the most fundamental algorithms in programming. It's been around in a published implementation of Binary Search since 1986, and the implementation of Binary Search for the JDK was broken for 9 years. This bug was only discovered in 2006, when someone's program broke.
Quick Summary - to get the "middle" element of the array, the line is this: int mid = (low + high) / 2;. This overflows when low + high is larger than MAX_INT, causing havoc.
The bug is in Binary Search - one of the most fundamental algorithms in programming. It's been around in a published implementation of Binary Search since 1986, and the implementation of Binary Search for the JDK was broken for 9 years. This bug was only discovered in 2006, when someone's program broke.
If you haven't heard of it, read more here: http://googleresearch.blogspot.com/2006/06/extra-extra-read-...
Quick Summary - to get the "middle" element of the array, the line is this: int mid = (low + high) / 2;. This overflows when low + high is larger than MAX_INT, causing havoc.