From 48e4f10535a67a7ecf55be690d0fb5943158086d Mon Sep 17 00:00:00 2001 From: dbuck Date: Thu, 6 Nov 2014 02:34:01 -0800 Subject: [PATCH] 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 --- src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp index 9a4a74160..fb96738a6 100644 --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp @@ -909,7 +909,7 @@ void os::workaround_expand_exec_shield_cs_limit() { */ char* hint = (char*) (Linux::initial_thread_stack_bottom() - ((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)) ) { return; // No matter, we tried, best effort. } -- GitLab