Re: Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM

2012-11-16 Thread Jochen Theodorou
Am 16.11.2012 17:31, schrieb Remi Forax: [...] > is called the first time you call a constructor, a static > method or get/set the value of a static field. Remi I am aware of that, but I cannot simply call a static method, or create an instance of a class that I don't know. As for a static fiel

Re: Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM

2012-11-16 Thread Remi Forax
On 11/16/2012 05:15 PM, Jochen Theodorou wrote: > Am 16.11.2012 16:05, schrieb Remi Forax: >> Jochen, >> can you extract a simple test class that reproduce the bug ? >> >> Also, methods of sun.misc.Unsafe are not protected again send null as >> arguments, >> so you have to do the check before calli

Re: Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM

2012-11-16 Thread Jochen Theodorou
Am 16.11.2012 16:05, schrieb Remi Forax: > Jochen, > can you extract a simple test class that reproduce the bug ? > > Also, methods of sun.misc.Unsafe are not protected again send null as > arguments, > so you have to do the check before calling unsafe.XXX. I am sure it is not null... as for a tes

Re: Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM

2012-11-16 Thread Remi Forax
Jochen, can you extract a simple test class that reproduce the bug ? Also, methods of sun.misc.Unsafe are not protected again send null as arguments, so you have to do the check before calling unsafe.XXX. RĂ©mi On 11/16/2012 03:36 PM, Jochen Theodorou wrote: > Hi all, > > in another thread I was

Way to statically initialize a class before or during MethodHandle creation, Unsafe crashes JVM

2012-11-16 Thread Jochen Theodorou
Hi all, in another thread I was already explaining, that I do need for a certain method call the initialized class, to select the right method. Remi for example then adviced me to use Unsafe and the method ensureClassInitialized... well after adding that I get a nice hs_err log file with > St