1.1 --- a/src/share/vm/prims/jvmtiEnv.cpp Thu Nov 05 11:42:42 2015 +0100 1.2 +++ b/src/share/vm/prims/jvmtiEnv.cpp Tue May 07 20:38:26 2019 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -1621,6 +1621,13 @@ 1.11 } 1.12 } 1.13 1.14 + if (initial_object != NULL) { 1.15 + oop init_obj = JNIHandles::resolve_external_guard(initial_object); 1.16 + if (init_obj == NULL) { 1.17 + return JVMTI_ERROR_INVALID_OBJECT; 1.18 + } 1.19 + } 1.20 + 1.21 Thread *thread = Thread::current(); 1.22 HandleMark hm(thread); 1.23 KlassHandle kh (thread, k_oop);