Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics
Andrew Haley
aph at redhat.com
Wed Feb 25 09:07:27 UTC 2015
On 24/02/15 23:20, John Rose wrote:
> On Feb 24, 2015, at 7:49 AM, Andrew Haley <aph at redhat.com <mailto:aph at redhat.com>> wrote:
>>
>>> There will be only one runtime Unsafe sub-type ever observed in a
>>> particular VM.
>>
>> Oh, that's very nice.
>
> That doesn't help with B accesses on L platforms and vice versa.
It wasn't supposed to, but OK, I guess we can extend it to do that.
Byte reversal was never handled at this level before and I'm not at
all sure it should be. I'll have a look.
> Having an optional boolean parameter (gating reverseBytes) will help.
>
> Also, it makes Unsafe non-final, which frankly gives me the willies.
> (Technical term, used by folks that have been through too many security escalations.)
> Let's not create any new ways for industrious hackers to attack Unsafe.
Oh, alright. It was such a tidy solution, though. :-)
Andrew.
More information about the core-libs-dev
mailing list