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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Jan 6 12:22:11 UTC 2021


> 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 with a new target base due to a merge or a rebase. The pull request now contains three commits:

 - Merge branch 'master' into 8259032_pagepos
 - Simplify test not to depend on implementation internals
 - Fix issue in Unmapper implementation not including `pagePosition` in address computation

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

Changes: https://git.openjdk.java.net/jdk16/pull/84/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=84&range=02
  Stats: 23 lines in 2 files changed: 22 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/84.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/84/head:pull/84

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


More information about the core-libs-dev mailing list