[jdk16] RFR: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition [v2]

Alan Bateman alanb at openjdk.java.net
Tue Jan 5 20:01:00 UTC 2021


On Tue, 5 Jan 2021 17:28:10 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Hi,
>> this patch fixes an oversight where the address() method in FileChannelImpl.Unmapper does not take into account the value of `pagePosition` - this leads to a situation in which, effectively, the specified offset when mapping the segment is ignored by the runtime (because base address will always be aligned to some known quantity - which is OS/platform dependent).
>> 
>> To test this I had to break open into FileChannelImpl and ready the granularity.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplify test not to depend on implementation internals

Good suggestion from Uwe.

-------------

Marked as reviewed by alanb (Reviewer).

PR: https://git.openjdk.java.net/jdk16/pull/84


More information about the core-libs-dev mailing list