> The type of the Unsafe base offset constant is int, which may cause overflow > when adding int offsets, such as 8343925 (PR #22012). 8343984 (PR #22027) > fixes most of the offset overflows in JDK, but ArraysSupport and CRC32C are > still unfixed. > > @liach proposed the idea of changing the Unsafe base offset to long, which > is a complete solution to the Unsafe offset overflow. After discussing with > @liach, I submitted this PR to implement @liach's idea.
Shaojin Wen has updated the pull request incrementally with three additional commits since the last revision: - Typos - Fix type expectations - Make base offset method and invalid offset long ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22095/files - new: https://git.openjdk.org/jdk/pull/22095/files/cb8487dd..6d4bb369 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22095&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22095&range=02-03 Stats: 49 lines in 32 files changed: 10 ins; 0 del; 39 mod Patch: https://git.openjdk.org/jdk/pull/22095.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22095/head:pull/22095 PR: https://git.openjdk.org/jdk/pull/22095