7011386: race in objArrayKlass::array_klass_impl

Move _lower_dimension field initialization before _higher_dimension and add storestore barrier.

Reviewed-by: dholmes, iveresov, never
This commit is contained in:
Vladimir Kozlov 2011-01-11 20:26:13 -08:00
parent 6a80d2126c
commit 4912ef0e5d
4 changed files with 11 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, 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
@ -36,8 +36,8 @@ class arrayKlass: public Klass {
friend class VMStructs;
private:
int _dimension; // This is n'th-dimensional array.
klassOop _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
klassOop _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
volatile klassOop _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
volatile klassOop _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
int _vtable_len; // size of vtable for this klass
juint _alloc_size; // allocation profiling support
oop _component_mirror; // component type, as a java/lang/Class