提交 48e4f105 编写于 作者: D dbuck

8058715: stability issues when being launched as an embedded JVM via JNI

Summary: Use mmap call without MAP_FIXED so we avoid corrupting already allocated memory
Reviewed-by: coleenp, dsimms
上级 35de3fa1
...@@ -909,7 +909,7 @@ void os::workaround_expand_exec_shield_cs_limit() { ...@@ -909,7 +909,7 @@ void os::workaround_expand_exec_shield_cs_limit() {
*/ */
char* hint = (char*) (Linux::initial_thread_stack_bottom() - char* hint = (char*) (Linux::initial_thread_stack_bottom() -
((StackYellowPages + StackRedPages + 1) * page_size)); ((StackYellowPages + StackRedPages + 1) * page_size));
char* codebuf = os::reserve_memory(page_size, hint); char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
return; // No matter, we tried, best effort. return; // No matter, we tried, best effort.
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册