8216982: Assertion poison page established too early

Reviewed-by: mdoerr, dholmes
This commit is contained in:
Thomas Stuefe 2019-01-15 08:03:30 +01:00
parent af43646ba3
commit 617f75c8cf

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -3716,6 +3716,10 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// Timing (must come after argument parsing)
TraceTime timer("Create VM", TRACETIME_LOG(Info, startuptime));
// Initialize the os module after parsing the args
jint os_init_2_result = os::init_2();
if (os_init_2_result != JNI_OK) return os_init_2_result;
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
// Initialize assert poison page mechanism.
if (ShowRegistersOnAssert) {
@ -3723,10 +3727,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
// Initialize the os module after parsing the args
jint os_init_2_result = os::init_2();
if (os_init_2_result != JNI_OK) return os_init_2_result;
SafepointMechanism::initialize();
jint adjust_after_os_result = Arguments::adjust_after_os();