[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    RFR: 8303942: FileMapInfo::write_bytes aborts on a short os::write
From:       Afshin Zafari <duke () openjdk ! org>
Date:       2023-03-31 19:38:21
Message-ID: uM45DTfT8XG6MAk9aHYCX64aH74YKlTdQ0mt9R-P0Bw=.e1bdd617-e0bf-4dbe-8538-663693875080 () github ! com
[Download RAW message or body]

`os::write` is called in a loop until all the requested size is written. The number of bytes parameter(`size_t nbytes`) is casted to `ssize_t size` to be able to check `> 0` condition. To enable pointer arithmetic, the `const void *` is casted to `const char *` for addition and then recasted back.

### Test
local: hotspot:tier1
mach5 tier1-5

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

Commit messages:
 - 8303942: FileMapInfo::write_bytes aborts on a short os::write

Changes: https://git.openjdk.org/jdk/pull/13188/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13188&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303942
  Stats: 11 lines in 1 file changed: 5 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/13188.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13188/head:pull/13188

PR: https://git.openjdk.org/jdk/pull/13188
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic