-
Bug
-
Resolution: Duplicate
-
P1
-
None
-
1.3.0
-
x86
-
windows_95
Name: dkC59003 Date: 07/23/99
JDK 1.3L fails the following JCK(114a, 116a, 12a) test:
vm/instr/astore_w/astore_w004/astore_w00401/astore_w00401.html
which contains method with 65535 locals.
"The greatest number of local variables in the local variables array of a frame
created upon invocation of a method is limited to 65535 by the size of the max_locals
item of the Code attribute ($4.7.3) giving the code of the method."
(JVMS, second edition, CHAPTER 4 The class File Format,
section 4.10 Limitations of the Java Virtual Machine)
The failure is reproduced only when hotspot VM is used.
The test is passed under -classic mode.
See reduced test case and logs below.
****************************** test.jasm source **************************
public class test {
public static Method run:"()I"
stack 2 locals 65535
{
iconst_0;
ireturn;
}
public static Method main:"([Ljava/lang/String;)V"
stack 2 locals 2
{
aload_0;
invokestatic Method run:"()I";
return;
}
}
****************************** do.bat source **************************
rem do.bat
@echo off
H:\ld25\java\dest\jdk1.3L\win32\bin\java %1 -version
H:\ld25\java\dest\jdk1.3L\win32\bin\java %1 -verify test
if not errorlevel=1 goto L1
echo ----Bad----
goto end
:L1
if errorlevel=0 echo ----OK----
:end
****************************** logs ******************************
>do.bat -classic
java version "1.3"
Classic VM (build JDK-1.3-L, native threads, nojit)
----OK----
>
>
>do.bat
java version "1.3"
HotSpot Client VM (1.3beta, mixed mode, build l)
Exception in thread "main" java.lang.StackOverflowError
at test.main(test.jasm)
----Bad----
>
****************************************************************
======================================================================
- duplicates
-
JDK-4245436 1.3c1: IE5 on NT system crashes when running vm/instr/astore_w/astore_w004/astor
- Closed