[foreign] RFR: 8229752: Use of pointer from scope.allocateArray with 0 element cause IllegalStateException

Henry Jen henry.jen at oracle.com
Thu Aug 15 04:28:04 UTC 2019


Hi,

Please review the webrev[1] for the fix is to make sure

1. NULL pointer is returned when allocate size 0, this is to make sure the pointer is with null layout, so that addr() won’t fail because of size check.
2. Pointer.copy to accept NULL pointer when copying 0 bytes. This make sure the interoperability with any other pointers when 0 bytes is needed.

Cheers,
Henry

[1] https://cr.openjdk.java.net/~henryjen/panama/8229752/0/webrev/


More information about the panama-dev mailing list