comparison src/hotspot/share/oops/instanceKlass.hpp @ 53116:b11483a74e5d

8215575: C2 crash: assert(get_instanceKlass()->is_loaded()) failed: must be at least loaded Summary: Set InstanceKlass::loaded before adding classes to the subklass list, which can be read concurrently by the compiler. Reviewed-by: dholmes, eosterlund
author coleenp
date Wed, 09 Jan 2019 07:52:45 -0500
parents 7cc17c043ce0
children
comparison
equal deleted inserted replaced
39:06310494455c 40:2f6fff1e966e
1 /* 1 /*
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
1240 } 1240 }
1241 bool check_sharing_error_state(); 1241 bool check_sharing_error_state();
1242 1242
1243 private: 1243 private:
1244 // initialization state 1244 // initialization state
1245 #ifdef ASSERT
1246 void set_init_state(ClassState state); 1245 void set_init_state(ClassState state);
1247 #else
1248 void set_init_state(ClassState state) { _init_state = (u1)state; }
1249 #endif
1250 void set_rewritten() { _misc_flags |= _misc_rewritten; } 1246 void set_rewritten() { _misc_flags |= _misc_rewritten; }
1251 void set_init_thread(Thread *thread) { _init_thread = thread; } 1247 void set_init_thread(Thread *thread) { _init_thread = thread; }
1252 1248
1253 // The RedefineClasses() API can cause new method idnums to be needed 1249 // The RedefineClasses() API can cause new method idnums to be needed
1254 // which will cause the caches to grow. Safety requires different 1250 // which will cause the caches to grow. Safety requires different