[foreign-abi] RFR 8232628: foreign-abi usability issues
Jorn Vernee
jorn.vernee at oracle.com
Tue Oct 22 11:50:36 UTC 2019
Looks good,
Cheers,
Jorn
On 22/10/2019 12:14, Maurizio Cimadamore wrote:
> P.S.
>
> The changes in DIrectSignatureShuffler are necessary to fix an
> exception (the current code is trying to call returnBindings when
> returnsInMemory is set)
>
> Maurizio
>
> On 22/10/2019 11:12, Maurizio Cimadamore wrote:
>> Whoops - forget the link
>>
>> http://cr.openjdk.java.net/~mcimadamore/panama/8232628/
>>
>> Maurizio
>>
>> On 18/10/2019 18:23, Maurizio Cimadamore wrote:
>>> Hi,
>>> as an experiment/test I tried to write a port of libclang which uses
>>> the low level MH and VH as a backbone. I discovered few usability
>>> issues in foreign-abi, which I tried to resolve with this patch;
>>> more specifically:
>>>
>>> - there's no way to get the null address
>>> - the null address is not stable, so it's hard to test
>>>
>>> For now, I've added a method to ForeignUnsafe - an alternative would
>>> be to add a NULL address constant in the MemoryAddress API, but if
>>> we do that, we need to make sure that the user can't do anything
>>> with it (which means we should probably create a NOTHING memory
>>> segment to prevent slicing).
>>>
>>> I'm open to experiment if there's a feeling this might be a better
>>> approach (e.g. to avoid relying on ForeignUnsafe too much).
>>>
>>> Maurizio
>>>
>>>
More information about the panama-dev
mailing list