1.1 --- a/src/share/vm/runtime/stubCodeGenerator.hpp Wed Jul 11 02:36:23 2018 -0700 1.2 +++ b/src/share/vm/runtime/stubCodeGenerator.hpp Mon Jul 09 15:35:45 2018 +0100 1.3 @@ -38,7 +38,7 @@ 1.4 1.5 class StubCodeDesc: public CHeapObj<mtCode> { 1.6 protected: 1.7 - static StubCodeDesc* _list; // the list of all descriptors 1.8 + static StubCodeDesc* volatile _list; // the list of all descriptors 1.9 static int _count; // length of list 1.10 1.11 StubCodeDesc* _next; // the next element in the linked list 1.12 @@ -69,13 +69,13 @@ 1.13 1.14 StubCodeDesc(const char* group, const char* name, address begin) { 1.15 assert(name != NULL, "no name specified"); 1.16 - _next = _list; 1.17 + _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); 1.18 _group = group; 1.19 _name = name; 1.20 _index = ++_count; // (never zero) 1.21 _begin = begin; 1.22 _end = NULL; 1.23 - _list = this; 1.24 + OrderAccess::release_store_ptr(&_list, this); 1.25 }; 1.26 1.27 const char* group() const { return _group; }