RFR: 8332697: ubsan: shenandoahSimpleBitMap.inline.hpp:68:23: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long int' [v3]
Henry Lin
duke at openjdk.org
Mon Jul 22 20:29:03 UTC 2024
> Cast the result of `nth_bit(n)` to `uintptr_t` to prevent signed integer overflow error reported by `ubsan`. Unsigned overflow is not undefined behavior and is not checked by `ubsan`.
Henry Lin has updated the pull request incrementally with one additional commit since the last revision:
revert right_n_bits and add unsigned right_n_bits to shenandoahSimpleBitMap.hpp
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20164/files
- new: https://git.openjdk.org/jdk/pull/20164/files/75d921cc..f2011961
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20164&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20164&range=01-02
Stats: 13 lines in 4 files changed: 6 ins; 1 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/20164.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20164/head:pull/20164
PR: https://git.openjdk.org/jdk/pull/20164
More information about the hotspot-dev
mailing list