I am initializing the Java VM using the following C++ code. JNI_CreateJavaVM
throws a 0xC0000005
exception but succeeds none the less if I ignore i
JVM actively uses OS signals (or exceptions in Windows terminology) for its own purposes:
SEGV (or exception 0xC0000005) is also generated intentionally on JVM startup to verify certain CPU/OS features. Some OSes or hypervisors had a bug that AVX registers are not restored after signal processing. Therefore, JVM needs to check whether this is the case (the source). So it generates an exception by writing to zero address and then handles it.
This is what happens in your case. And yes, it is normal.
This is normal, like @apangin said. If you want to switch all 0xC0000005 exceptions off in VisualStudio (2017), you can do that: