[foreign] RFR 8212987 : Binder should allows negative values for native pointers

Henry Jen henry.jen at oracle.com
Tue Oct 30 00:59:11 UTC 2018


BTW, the change in toString is not needed, as toUnsignedString(l, 16) is same as toHexString(l)?

Cheers,
Henry


> On Oct 29, 2018, at 5:56 PM, Henry Jen <henry.jen at oracle.com> wrote:
> 
> I am afraid this is not that simple, we need to at least protect length from overflow the address to >= 0.
> 
> I haven’t completely check the implementation, we need to make sure all other operation will not expand or shift the region, which I believe is the constraint of the design. If that’s indeed the case, guard at construction is probably good enough.
> 
> Cheers,
> Henry
> 
>> On Oct 29, 2018, at 10:04 AM, Jorn Vernee <jbvernee at xs4all.nl> wrote:
>> 
>> Hello,
>> 
>> Please review this patch which tweaks the binder to allow negative values for native pointers.
>> 
>> The problem was previously discussed here: http://mail.openjdk.java.net/pipermail/panama-dev/2018-October/002994.html
>> 
>> Bug : https://bugs.openjdk.java.net/browse/JDK-8212987
>> Webrev : http://cr.openjdk.java.net/~jvernee/panama/webrevs/8212987/
>> 
>> As a reminder, I'm not a committer, so someone else will have to push this.
>> 
>> Thanks,
>> Jorn
> 



More information about the panama-dev mailing list