diff src/share/vm/oops/typeArrayKlass.cpp @ 2132:d4fca0a6abde

7011386: race in objArrayKlass::array_klass_impl Summary: Move _lower_dimension field initialization before _higher_dimension and add storestore barrier. Reviewed-by: dholmes, iveresov, never
author kvn
date Tue, 11 Jan 2011 20:26:13 -0800
parents f95d63e2154a
children 3582bf76420e
line wrap: on
line diff
--- a/src/share/vm/oops/typeArrayKlass.cpp	Mon Jan 10 18:46:29 2011 -0800
+++ b/src/share/vm/oops/typeArrayKlass.cpp	Tue Jan 11 20:26:13 2011 -0800
@@ -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
@@ -179,6 +179,7 @@
           dimension + 1, h_this, CHECK_NULL);
         h_ak = objArrayKlassHandle(THREAD, oak);
         h_ak->set_lower_dimension(h_this());
+        OrderAccess::storestore();
         h_this->set_higher_dimension(h_ak());
         assert(h_ak->oop_is_objArray(), "incorrect initialization of objArrayKlass");
       }