RFR: 8168914: Crash in ClassLoaderData/JNIHandleBlock::oops_do during concurrent marking (original) (raw)

Kim Barrett kim.barrett at oracle.com
Mon Feb 20 18:56:57 UTC 2017


On Feb 20, 2017, at 10:47 AM, Erik Helin <erik.helin at oracle.com> wrote:

Ok, lets see if we can wrap this up :) I just uploaded a new version, 03: - incremental: http://cr.openjdk.java.net/~ehelin/8168914/02-03/ - full: http://cr.openjdk.java.net/~ehelin/8168914/03/


src/share/vm/classfile/classLoaderData.cpp 136 Chunk* volatile head = (Chunk*) OrderAccess::load_ptr_acquire((volatile intptr_t*)&_head);

The "volatile" in the declaration of head is unnecessary/misplaced. It's not the variable "head" is modifiable by other threads. Correct would be "Chunk volatile * head", but then the volatile would need to be const_casted away when initializing "c". Better to just drop it, as the load_acquire provides all the needed ordering.


src/share/vm/classfile/classLoaderData.cpp 136 Chunk* volatile head = (Chunk*) OrderAccess::load_ptr_acquire((volatile intptr_t*)&_head);

Why the cast of &_head for the load_ptr_acquire?

Similarly, why the casts (both of them) here: 127 OrderAccess::release_store_ptr((volatile intptr_t*) &_head, (intptr_t) next);




More information about the hotspot-dev mailing list