Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085059 | emb-9 | Volker Simonis | P4 | Resolved | Fixed | team |
Compiling the function jvm_attach_thread_func in jdk/src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c with /RTC1 generates code which is not runnable in another process. However during attach, jvm_attach_thread_func will be injected into the process space of another Java process. If it was compiled with /RTC1 it will crash on execution.
The fix is simple. Just prevent the checks done by /RTC1 by using an appropriate pragma:
/* Switch off all runtime checks (checks caused by /RTC<x>). They cause the
* generated code to contain relative jumps to check functions which make
* the code position dependent. */
#pragma runtime_checks( "scu", off )
DWORD WINAPI jvm_attach_thread_func(DataBlock *pData)
The fix is simple. Just prevent the checks done by /RTC1 by using an appropriate pragma:
/* Switch off all runtime checks (checks caused by /RTC<x>). They cause the
* generated code to contain relative jumps to check functions which make
* the code position dependent. */
#pragma runtime_checks( "scu", off )
DWORD WINAPI jvm_attach_thread_func(DataBlock *pData)
- backported by
-
JDK-8085059 JVM crashes on attach on Windows when compiled with /RTC1
-
- Resolved
-