diff -r bae7d3cdf6af -r 80d32985a3eb src/share/vm/runtime/stubCodeGenerator.hpp --- a/src/share/vm/runtime/stubCodeGenerator.hpp Wed Jul 11 02:36:23 2018 -0700 +++ b/src/share/vm/runtime/stubCodeGenerator.hpp Mon Jul 09 15:35:45 2018 +0100 @@ -38,7 +38,7 @@ class StubCodeDesc: public CHeapObj { protected: - static StubCodeDesc* _list; // the list of all descriptors + static StubCodeDesc* volatile _list; // the list of all descriptors static int _count; // length of list StubCodeDesc* _next; // the next element in the linked list @@ -69,13 +69,13 @@ StubCodeDesc(const char* group, const char* name, address begin) { assert(name != NULL, "no name specified"); - _next = _list; + _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); _group = group; _name = name; _index = ++_count; // (never zero) _begin = begin; _end = NULL; - _list = this; + OrderAccess::release_store_ptr(&_list, this); }; const char* group() const { return _group; }