There's an EXCEPTION_MARK and right afterwards, code that has CHECK_0 parameter.
The CHECK_0 is return 0 if there's a pending exception but before it returns, the EXCEPTION_MARK destructor will assert that there should be no exceptions pending. There are two problems with this code.
1. CHECK_0 returns 0 which is JNI_OK which makes the caller JNI_CreateJavaVM continue as if there was no error. There's no check for EXCEPTION_PENDING in the caller.
2. The EXCEPTION_MARK assert isn't as helpful as finding out the real exception. It should probably call vm_exit_during_initialization() with the exception that was thrown.