Mon, 15 Jul 2013 11:35:10 +0200
8019324: assert(_f2 == 0 || _f2 == f2) failed: illegal field change
Reviewed-by: dholmes, rbackman
Contributed-by: David Simms <david.simms@oracle.com>
src/share/vm/oops/cpCache.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/oops/cpCache.hpp Fri Jul 12 20:47:23 2013 +0200 1.2 +++ b/src/share/vm/oops/cpCache.hpp Mon Jul 15 11:35:10 2013 +0200 1.3 @@ -140,8 +140,15 @@ 1.4 _f1 = f1; 1.5 } 1.6 void release_set_f1(Metadata* f1); 1.7 - void set_f2(intx f2) { assert(_f2 == 0 || _f2 == f2, "illegal field change"); _f2 = f2; } 1.8 - void set_f2_as_vfinal_method(Method* f2) { assert(_f2 == 0 || _f2 == (intptr_t) f2, "illegal field change"); assert(is_vfinal(), "flags must be set"); _f2 = (intptr_t) f2; } 1.9 + void set_f2(intx f2) { 1.10 + intx existing_f2 = _f2; // read once 1.11 + assert(existing_f2 == 0 || existing_f2 == f2, "illegal field change"); 1.12 + _f2 = f2; 1.13 + } 1.14 + void set_f2_as_vfinal_method(Method* f2) { 1.15 + assert(is_vfinal(), "flags must be set"); 1.16 + set_f2((intx)f2); 1.17 + } 1.18 int make_flags(TosState state, int option_bits, int field_index_or_method_params); 1.19 void set_flags(intx flags) { _flags = flags; } 1.20 bool init_flags_atomic(intx flags);