Try running the following code using Java 6 on Mac OS X:
--------------------
System.out.println("A");
new Thread(){public void run(){ System.out.println("1"); }}.start();
System.out.println("B");
Runnable r = new Runnable(){public void run(){ System.out.println("2"); }};
int stackSize = 32*1024;
new Thread(null, r, "name", stackSize).start();
System.out.println("C");
--------------------
this will output the following:
--------------------
A
B
1
C
Invalid memory access of location fffffff8 rip=010f374c
--------------------
The documentation of creating new threads with custom stack sizes does state that the behavior will be highly operating system-dependant, but I think crashing the entire JVM is a bit extreme. Apart from this the same code runs perfectly fine on Windows and Linux.
The original forum thread discussing this problem is here: http://www.javagaming.org/index.php/topic,19258.0.html
-- Dennis Bijlsma
_______________________________________________