[foreign] RFR 8217414: Remove bounds check in BoundedPointer constructor

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Jan 21 12:56:51 UTC 2019


This change looks good.

PS. All tests run fine on Mac.

-Sundar

On 21/01/19, 5:30 PM, Jorn Vernee wrote:
> Hi,
>
> I have a patch addressing 2 vacuously passing tests (api/PointerTest 
> and api/ArrayTest). The patch fixes the tests, and to make that happen 
> removes the bounds check in BoundedPointer's constructor. As discussed 
> offline; this check is not needed since we already de a check when 
> dereferencing a pointer in BoundedMemoryRegion, and the check in the 
> constructor is overly restrictive since it should be fine to create 
> out-of-bounds pointers as long as it is not dereferenced. This does 
> mean the tests needed to be tweaked since now an access exception is 
> throw at a later point.
>
> Please review the following.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8217414
> Webrev: 
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/8217414/webrev.00
>
> Thanks,
> Jorn


More information about the panama-dev mailing list