[libbluray-devel] [PATCH] VM loading for win32 dll's

Erik Van Grunderbeeck erik at arawix.com
Sun Mar 27 15:09:49 CEST 2011


> +#ifdef WIN32
> +    fptr_JNI_CreateJavaVM JNI_CreateJavaVM_fp = (fptr_JNI_CreateJavaVM)GetProcAddress(jvm_lib, "JNI_CreateJavaVM");
> +#else  //      #ifdef WIN32
> +    fptr_JNI_CreateJavaVM JNI_CreateJavaVM_fp = (fptr_JNI_CreateJavaVM)dl_dlsym(jvm_lib, "JNI_CreateJavaVM");
> +#endif //      #ifdef WIN32

>>If GetProcAddress() returns pointer (32-bit in Win32), I can't see how
>>those two differ ? dl_dlsym() is just a wrapper for GetProcAddress().

Ok I was able to reproduce this with the intel compiler turning inter_procedureal optimalisations on.

As far as I can see from the stacktrace, it happens when during loading of the VM an exception is thrown in the VM. This fails the call to the CreateVM(). If I turn the optimalisations off, it works fine as far as I can see (the dl_dlsym()code is not inlined then). 

This patch can be ignored, I'll file a bug-report with Intel.

Erik



More information about the libbluray-devel mailing list