8164038: Missing volatile keyword at CardTableRS::write_ref_field_gc_par()
authorsangheki
Thu, 09 Mar 2017 15:00:23 -0800
changeset 46321 640277633c23
parent 46320 a38f07dfcf47
child 46322 25836096c89d
8164038: Missing volatile keyword at CardTableRS::write_ref_field_gc_par() Reviewed-by: tschatzl, kbarrett
hotspot/src/share/vm/gc/shared/cardTableRS.cpp
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.cpp	Wed Mar 08 19:25:15 2017 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.cpp	Thu Mar 09 15:00:23 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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
@@ -282,7 +282,7 @@
 // cur-younger-gen                ==> cur_younger_gen
 // cur_youngergen_and_prev_nonclean_card ==> no change.
 void CardTableRS::write_ref_field_gc_par(void* field, oop new_val) {
-  jbyte* entry = _ct_bs->byte_for(field);
+  volatile jbyte* entry = _ct_bs->byte_for(field);
   do {
     jbyte entry_val = *entry;
     // We put this first because it's probably the most common case.