8253639: Change os::attempt_reserve_memory_at parameter order

Reviewed-by: tschatzl, iklam
This commit is contained in:
Stefan Karlsson 2020-09-28 07:12:48 +00:00
parent fed3636f12
commit ca1ed16292
10 changed files with 27 additions and 27 deletions

View file

@ -859,7 +859,7 @@ void os::workaround_expand_exec_shield_cs_limit() {
*/
char* hint = (char*)(Linux::initial_thread_stack_bottom() -
(JavaThread::stack_guard_zone_size() + page_size));
char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
char* codebuf = os::attempt_reserve_memory_at(hint, page_size);
if (codebuf == NULL) {
// JDK-8197429: There may be a stack gap of one megabyte between
@ -867,7 +867,7 @@ void os::workaround_expand_exec_shield_cs_limit() {
// Linux kernel workaround for CVE-2017-1000364. If we failed to
// map our codebuf, try again at an address one megabyte lower.
hint -= 1 * M;
codebuf = os::attempt_reserve_memory_at(page_size, hint);
codebuf = os::attempt_reserve_memory_at(hint, page_size);
}
if ((codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true))) {