8165857: CMS _overflow_list is missing volatile specifiers.
authoreosterlund
Tue, 27 Sep 2016 16:43:59 -0400
changeset 41317 ba006b931e27
parent 41316 216f4f645fd8
child 41339 4273117df541
8165857: CMS _overflow_list is missing volatile specifiers. Summary: Change _overflow_list from "oop" to "oopDesc* volatile", both CMS and ParNew. Reviewed-by: kbarrett, tschatzl
hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp
hotspot/src/share/vm/gc/cms/parNewGeneration.hpp
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp	Mon Sep 26 17:49:01 2016 +0300
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp	Tue Sep 27 16:43:59 2016 -0400
@@ -540,7 +540,7 @@
 
   // Overflow list of grey objects, threaded through mark-word
   // Manipulated with CAS in the parallel/multi-threaded case.
-  oop _overflow_list;
+  oopDesc* volatile _overflow_list;
   // The following array-pair keeps track of mark words
   // displaced for accommodating overflow list above.
   // This code will likely be revisited under RFE#4922830.
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Mon Sep 26 17:49:01 2016 +0300
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Tue Sep 27 16:43:59 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -323,7 +323,7 @@
   // A list of from-space images of to-be-scanned objects, threaded through
   // klass-pointers (klass information already copied to the forwarded
   // image.)  Manipulated with CAS.
-  oop _overflow_list;
+  oopDesc* volatile _overflow_list;
   NOT_PRODUCT(ssize_t _num_par_pushes;)
 
   // This closure is used by the reference processor to filter out