Re: Crash using sun.misc.Unsafe.static

2012-07-17 Thread Rémi Forax
On 07/18/2012 12:55 AM, John Rose wrote: > On Jul 16, 2012, at 4:06 PM, Krystal Mok wrote: > >> And you're right that this has to do with the PermGen removal >> project. The difference comes from [1], which is a part of CR 7017732. >> To be specific, before the 7017732, static fields are stored in

Re: Crash using sun.misc.Unsafe.static

2012-07-17 Thread John Rose
On Jul 16, 2012, at 4:06 PM, Krystal Mok wrote: > And you're right that this has to do with the PermGen removal project. The > difference comes from [1], which is a part of CR 7017732. > To be specific, before the 7017732, static fields are stored in the > instanceKlass of a Java class; an insta

Re: Crash using sun.misc.Unsafe.static

2012-07-17 Thread Rémi Forax
On 07/17/2012 01:06 AM, Krystal Mok wrote: > Hi Remi, > > Looks like it's a trap if you're running this on JDK6's HotSpot VM. If > you're running a debug build of the same VM, you should hit an > assertion before hitting the ShouldNotReachHere() part. > > opto/type.cpp:2477 > assert(o->is_java_ob

Crash using sun.misc.Unsafe.static

2012-07-16 Thread Rémi Forax
Hi guys, the latest jdk6 (jdk6 update 33) fails hard in the compiler if I try to store the result of unsafe.staticFieldBase() in a static final field, i.e if it's considered as a constant. Neither recent jdk7 nor jdk8 crash, only jdk6 (it also failed with update 21 which is the oldest version I h