Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JVM crash when launching threads with custom stack size



Sounds like a bug. Can you file a report at <http://bugreporter.apple.com>?

Pratik

On Sep 29, 2008, at 2:15 AM, Dennis Bijlsma | Adjustables wrote:


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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >JVM crash when launching threads with custom stack size (From: "Dennis Bijlsma | Adjustables" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.