Name: rl43681 Date: 08/14/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
The java command in the 1.3 SDK appears to ignore the -Xss (and -ss) argument, and there
does not appear to be another way to specify stack size. This results in a
stack overflow during a call to a JNI function. The java command accepts a -Xss
argument, but always sets the stack to 256K (starting at approximately
0x06F788) regardless of the -Xss specification. This means that my application,
which works fine with the JDK 1.2 does not work with 1.3. The particular call
that results in the stack overflow is a call to the system service() function
for I/O on a socket. This requires over 200K of stack space.
You can reproduce (or at least verify) this issue with
any JNI application. Simply insert the following code near the beginning:
void * stack_ptr;
__asm mov stack_ptr, esp;
printf("ESP = %X\n", stack_ptr);
This prints the address of the top of the stack. You'll see that it's the
same (about 0x68000) regardless of what's specified for -Xss.
(Review ID: 108285)