[foreign-memaccess] RFR 8227107: Add missing toString implementation to MemorySegmentImp

Henry Jen henry.jen at oracle.com
Tue Jul 2 18:15:39 UTC 2019


Looks fine, I am not sure if this is desired that toString() actually check state and can cause exception rather than simply offer information about the object where sometimes be useful for debugging.

Cheers,
Henry


> On Jul 2, 2019, at 9:29 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> Hi,
> this trivial fix adds a simple toString() method to MemorySegmentImpl.
> 
> This is needed in at least two places:
> 
> * MemoryAddressImpl::toString
> * MemorySegmentimpl::outOfBoundsMsg
> 
> Since the toString() method can't reveal sensitive pointer info, the only thing we can safely expose is the segment 'limit' (e.g. the size).
> 
> http://cr.openjdk.java.net/~mcimadamore/panama/8227107/
> 
> Cheers
> Maurizio
> 



More information about the panama-dev mailing list