Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6233394

forName(String,boolean,ClassLoader) crashes when primitive type name intercepted

    XMLWordPrintable

Details

    • b65
    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      JVM crashes with "EXCEPTION_ACCESS_VIOLATION"

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Just run the example.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected:
      Load: int
      ForName: int

      Actual:
      Load: int
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7310ea, pid=2120, tid=2576
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 interpreted mode)
      # Problematic frame:
      # V [jvm.dll+0xf10ea]
      #
      # An error report file with more information is saved as hs_err_pid2120.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7310ea, pid=2120, tid=2576
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 interpreted mode)
      # Problematic frame:
      # V [jvm.dll+0xf10ea]
      #

      --------------- T H R E A D ---------------

      Current thread (0x00037cb0): JavaThread "main" [_thread_in_vm, id=2576]

      siginfo: ExceptionCode=0xc0000005, reading address 0x00000048

      Registers:
      EAX=0x00000000, EBX=0x00000000, ECX=0x00000000, EDX=0x06b2f418
      ESP=0x0007f84c, EBP=0x0007f878, ESI=0x00037cb0, EDI=0x00000000
      EIP=0x6d7310ea, EFLAGS=0x00010246

        Top of Stack: (sp=0x0007f84c)
      0x0007f84c: 00037030 00037cb0 006c8969 0000000c
      0x0007f85c: 6d719b53 06b33e80 06b2f418 00037858
      0x0007f86c: 00037450 00037458 00037844 0007f8e4
      0x0007f87c: 6d73091a 0007f8c8 00037028 00037030
      0x0007f88c: 00037040 00037028 00037028 00037028
      0x0007f89c: 00001224 00037458 0000000f 76f84404
      0x0007f8ac: 0000002d 00037cb0 0000000e 0007f900
      0x0007f8bc: 00037cb0 00037030 00000003 000367f0

      Instructions: (pc=0x6d7310ea)
      0x6d7310da: 33 d2 eb 02 8b 11 3b c3 75 04 33 c9 eb 02 8b 08
      0x6d7310ea: 3b 51 48 75 07 8b 75 08 89 06 eb 05 8b 75 08 89


      Stack: [0x00040000,0x00080000), sp=0x0007f84c, free space=254k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xf10ea]
      V [jvm.dll+0xf091a]
      V [jvm.dll+0xf0404]
      V [jvm.dll+0xf0310]
      V [jvm.dll+0x9e6d0]
      V [jvm.dll+0x9797a]
      C [java.dll+0x13d8]
      j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
      j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+32
      j PrimitiveLoader.main([Ljava/lang/String;)V+44
      v ~StubRoutines::call_stub
      V [jvm.dll+0x8168d]
      V [jvm.dll+0xd4179]
      V [jvm.dll+0x8155e]
      V [jvm.dll+0x8844c]
      C [java.exe+0x14c0]
      C [java.exe+0x64cd]
      C [kernel32.dll+0x2141a]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
      j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+32
      j PrimitiveLoader.main([Ljava/lang/String;)V+44
      v ~StubRoutines::call_stub

      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
        0x00a92020 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2140]
        0x00a90bf8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2152]
        0x00a8ff28 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2148]
        0x00a87400 JavaThread "Finalizer" daemon [_thread_blocked, id=2144]
        0x00a85f70 JavaThread "Reference Handler" daemon [_thread_blocked, id=1560]
      =>0x00037cb0 JavaThread "main" [_thread_in_vm, id=2576]

      Other Threads:
        0x00a396d8 VMThread [id=3312]
        0x00a931f8 WatcherThread [id=2136]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap
       def new generation total 576K, used 179K [0x02ad0000, 0x02b70000, 0x02fb0000)
        eden space 512K, 34% used [0x02ad0000, 0x02afcc78, 0x02b50000)
        from space 64K, 0% used [0x02b50000, 0x02b50000, 0x02b60000)
        to space 64K, 0% used [0x02b60000, 0x02b60000, 0x02b70000)
       tenured generation total 1408K, used 0K [0x02fb0000, 0x03110000, 0x06ad0000)
         the space 1408K, 0% used [0x02fb0000, 0x02fb0000, 0x02fb0200, 0x03110000)
       compacting perm gen total 8192K, used 1363K [0x06ad0000, 0x072d0000, 0x0aad0000)
         the space 8192K, 16% used [0x06ad0000, 0x06c24ff8, 0x06c25000, 0x072d0000)
      No shared spaces configured.

      Dynamic libraries:
      0x00400000 - 0x0040c000 c:\Program Files\Java\jdk1.5.0\bin\java.exe
      0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll
      0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll
      0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll
      0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll
      0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll
      0x6d640000 - 0x6d7c5000 c:\Program Files\Java\jdk1.5.0\jre\bin\client\jvm.dll
      0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
      0x7f000000 - 0x7f041000 C:\WINDOWS\system32\GDI32.dll
      0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll
      0x76390000 - 0x763ac000 C:\WINDOWS\System32\IMM32.DLL
      0x6d280000 - 0x6d288000 c:\Program Files\Java\jdk1.5.0\jre\bin\hpi.dll
      0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL
      0x6d610000 - 0x6d61c000 c:\Program Files\Java\jdk1.5.0\jre\bin\verify.dll
      0x6d300000 - 0x6d31d000 c:\Program Files\Java\jdk1.5.0\jre\bin\java.dll
      0x6d630000 - 0x6d63f000 c:\Program Files\Java\jdk1.5.0\jre\bin\zip.dll

      VM Arguments:
      jvm_args: -Xint
      java_command: PrimitiveLoader

      Environment Variables:
      CLASSPATH=c:\sybase\ASEP\3pclass.zip;c:\sybase\ASEP\monclass.zip;C:\Program Files\Rational\RUPBuilder;C:\Program Files\Rational\common\java\swingall.jar;C:\Program Files\Rational\common\java\javahelp\jh.jar
      PATH=c:\progra~1\rational\ration~1\nutcroot\bin;c:\progra~1\rational\ration~1\nutcroot\mksnt;c:\sybase\ocs-12_0\dll;c:\sybase\ocs-12_0\bin;c:\sybase\asep;c:\oracle\ora81\bin;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\progra~1\ibm\client~1;c:\progra~1\ibm\client~1\shared;c:\progra~1\ibm\client~1\emulator;c:\program files\fidelity\security configuration;c:\program files\rational\common;c:\program files\rational\clearcase\bin;c:\program files\rational\clearquest;c:\program files\rational\rational test;c:\program files\rational\rupbuilder;c:\unxutils\usr\local\wbin;c:\jdk1.3\bin;c:\pvcs68\vm\win32\bin;c:\program files\sun\messagequeue3\bin;"c:\Program Files\TextPad 4"
      USERNAME=A353083
      SHELL=C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\mksnt\sh.exe
      DISPLAY=:0.0
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, GenuineIntel


      --------------- S Y S T E M ---------------

      OS: Windows XP Build 2600 Service Pack 1

      CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

      Memory: 4k page, physical 1048048k(324976k free), swap 2520412k(1991092k free)

      vm_info: Java HotSpot(TM) Client VM (1.5.0-b64) for windows-x86, built on Sep 15 2004 03:00:31 by "java_re" with MS VC++ 6.0



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      public class PrimitiveLoader extends ClassLoader {

      protected Class findClass(String name)
      throws ClassNotFoundException
      {
      if( name.equals("int") ) return Integer.TYPE;
      throw new ClassNotFoundException(name);
      }

      public static void main(String[] argv)
      throws ClassNotFoundException
      {
      PrimitiveLoader pl = new PrimitiveLoader();

      Class c1 = pl.loadClass("int");
      System.out.println("Load: " + c1);
      Class c2 = Class.forName("int",false,pl);
      System.out.println("ForName: " + c2);
      }
      }

      ---------- END SOURCE ----------
      ###@###.### 2005-2-25 22:15:59 GMT

      Attachments

        Activity

          People

            acorn Karen Kinnear (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: