[foreign-abi] RFR 8232628: foreign-abi usability issues
    Maurizio Cimadamore 
    maurizio.cimadamore at oracle.com
       
    Fri Oct 18 17:23:29 UTC 2019
    
    
  
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