JDK-4254544 : Internal error with Hotspot VM when a HashMap is inserted into itself
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-07-15
  • Updated: 1999-07-15
  • Resolved: 1999-07-15
Related Reports
Relates :  
Relates :  
Description

Name: mc57594			Date: 07/15/99


The following program fails with an internal error when run under HotSpot VM:

import java.util.*;
public class t {
    public static void main(String[] args) throws Throwable {
        HashMap hm = new HashMap();
        for (int i = 0; i < 10; i++) hm.put(new Integer(i), new Integer(i));
        hm.put(hm, hm);
        for (int i = 0; i < 10; i++) hm.get(new Integer(i));
        System.out.println(hm.get(hm));
    }
}

The error is:
#
# HotSpot Virtual Machine Error, Internal Error
#
# Error ID: 53484152454432554E54494D450E4350500110
#

If java -Xint or java -classic is used, the same program gets a stack overflow exception which is understandable if not very robust. Therefore I assume that the problem happens only if HashMap methods are compiled by HotSpot.
(Review ID: 85056) 
======================================================================

Comments
EVALUATION This cannot be reproduced with HotSpot 1.0.1 EA rene.schmidt@eng 1999-07-15
15-07-1999