8138922: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list

Reviewed-by: kvn, coleenp, dholmes
This commit is contained in:
Vladimir Ivanov 2016-02-15 20:26:02 +03:00
parent 596b56f6c7
commit e675738256
7 changed files with 35 additions and 54 deletions

View file

@ -3600,6 +3600,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
vm_exit_during_initialization("Failed to initialize tracing backend");
}
// No more stub generation allowed after that point.
StubCodeDesc::freeze();
// Set flag that basic initialization has completed. Used by exceptions and various
// debug stuff, that does not work until all basic classes have been initialized.
set_init_completed();