Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

https://github.com/openjdk/jdk/commit/0fb014c2b3cff00c15e9e7cb6653818d061216e9

https://bugs.openjdk.org/browse/JDK-8023463

>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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading