RFR: 8309475: Test java/foreign/TestByteBuffer.java fails: a problem with msync (aix) [v3]

Tyler Steele tsteele at openjdk.org
Mon Aug 14 16:58:06 UTC 2023


> This change adds additional support to MappedByteBuffer::force which delegates to msync on AIX. Specifically, it checks whether and error with errno set to EINVAL is the cause of a msync call to an address mmapped with the MAP_PRIVATE flag set. If this flag is set, then the msync call EINVAL is expected, and can be ignored as per the Java documentation of the force method.
> 
>> In particular, the method has no effect for buffers mapped in read-only or private mapping modes. [1]
> 
> Separated into separate file as per recommendation by @AlanBateman.
> 
> [1] https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/nio/MappedByteBuffer.html#force()

Tyler Steele has updated the pull request incrementally with one additional commit since the last revision:

  Cast void* to uint64_t to prevent xlc 17.1 warning

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14964/files
  - new: https://git.openjdk.org/jdk/pull/14964/files/35657914..75672006

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14964&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14964&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14964.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14964/head:pull/14964

PR: https://git.openjdk.org/jdk/pull/14964


More information about the nio-dev mailing list