RFR (S): 8186787: clang-4.0 SIGSEGV in Unsafe_PutByte

Erik Osterlund erik.osterlund at oracle.com
Thu Nov 30 19:50:02 UTC 2017


Hi Kim,

Thanks for the review.

/Erik

On 30 Nov 2017, at 20:34, Kim Barrett <kim.barrett at oracle.com> wrote:

>> On Nov 29, 2017, at 8:48 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
>> 
>> Hi Kim,
>> 
>> I know how you feel about casts, and I also saw how Andrew Haley wanted a more explicit comment about why it needs to be volatile.
>> To make both of you happy, I thought I'd try to make the address (addr()) in MemoryAccess volatile T*. That way I can write a more explicit comment about why it is volatile in one single place, and make you happier to not cast the address to something else than it was declared.
>> 
>> I hope this makes both of you happy. If not, I am okay with the old variant too, and write a comment that I copy around instead.
>> 
>> Full webrev:
>> http://cr.openjdk.java.net/~eosterlund/8186787/webrev.01/
>> 
>> Incremental webrev:
>> http://cr.openjdk.java.net/~eosterlund/8186787/webrev.00_01/
> 
> Sorry to be late; I hadn't noticed there was followup and a new
> version yesterday until Coleen pointed it out to me.
> 
> This is okay, though I think better would be to make addr() a function
> template (with a non-deducable type parameter), rather than making
> MemoryAccess a class template. The point of that difference is the
> principle of minimizing the dependencies between members and type
> parameters of a generic class (in this case by not making the class
> generic at all).
> 



More information about the hotspot-runtime-dev mailing list