[foreign] RFR 8225034: java/foreign/LongDoubleTest.java fails on Mac OS

Jorn Vernee jbvernee at xs4all.nl
Thu May 30 13:38:32 UTC 2019


Thanks for the reviews.

There's one other thing I realized as well; Util::withOffHeapAddress 
requires READ_WRITE access for heap-based pointers, since it needs to 
copy the value back and forth to offheap. I've added a comment to the 
method that mentions that. I don't think there's any way around 
requiring READ_WRITE access with the current offheap buffering approach.

Jorn

Maurizio Cimadamore schreef op 2019-05-30 15:12:
> Patch looks good code-wise. Good to go!
> 
> Maurizio
> 
> On 30/05/2019 14:15, Sundararajan Athijegannathan wrote:
>> With your patch, all tests run fine on Mac OS.
>> 
>> -Sundar
>> 
>> On 30/05/19, 5:58 PM, Jorn Vernee wrote:
>>> Hi,
>>> 
>>> After strengthening the access checking for Pointer::addr(), the 
>>> LongDoubleTest is failing. The problem is that UniversalUpcallHandler 
>>> creates a READ only pointer, which References::OfLongDouble then 
>>> tries to unbox using addr(), but this requires READ_WRITE access.
>>> 
>>> To solve this I'm letting References::OfLongDouble do manual access 
>>> checking for read/write only and use an unchecked version of addr(), 
>>> which is then used to get/set the value. LongDoubleTest is disabled 
>>> on Windows, so I've also added a LongDoubleBinderTest that just tests 
>>> the binder part on all platforms.
>>> 
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8225034
>>> Webrev: 
>>> http://cr.openjdk.java.net/~jvernee/panama/webrevs/8225034/webrev.00/
>>> 
>>> This also fixes a minor hickup which prevents compilation in 
>>> AArch64ABI, which still expected the old signature of addr().
>>> 
>>> Thanks,
>>> Jorn


More information about the panama-dev mailing list