What is the dead loop bug in HashMap in earlier versions?

I have been reading https://www.alibabacloud.com/blog/the-clever-design-of-java-map_597979 for the internal implementation of the HashMap and CHM.

There is an interesting line for which I could not find more explanation for :

enter image description here

Can someone point me to the bug this refers to?

I could only find the bug related to HashMap improvement with RB-Trees, but nothing about the dead loop.



>Solution :

Here is the bug in JDK tracker: https://bugs.openjdk.org/browse/JDK-7027300

And the similar question was answered in Java HashMap.get(Object) infinite loop. Here is the link to exact place in the code causing the issue: https://stackoverflow.com/a/44180452/12473843

P.S. This one is for CHM: https://bugs.openjdk.org/browse/JDK-8142175

Leave a Reply