RFR: 8331201: UBSAN enabled build reports on Linux x86_64 runtime error: shift exponent 65 is too large for 64-bit type 'long unsigned int' [v3]
Afshin Zafari
azafari at openjdk.org
Mon Feb 10 10:04:10 UTC 2025
> The issue existed in making Fingerprints of method names. Each parameter in the methods' arguments is decoded as a 4-bits value. The 64-bits `fingertprint_t` can hold up to 14 parameters plus return type and static bit. To make the Fingerprint, the signature is iterated one parameter at a time and the corresponding code is accumulated after shifting the bits up.
> Some compilers do not mask the shift value to the base size and UBSAN catches the case.
> In this PR, the number of parameters (`_param_count`) is used and compared with the max (14) to do the shift operation safely. The pre-existing `_param_size` is not reflecting the number of parameters, since it is incremented by 2 for `T_DOUBLE` and `T_LONG` types.
Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- Merge with master
- size -> count in comments
- removed extra blank lines
- 8331201: UBSAN enabled build reports on Linux x86_64 runtime error: shift exponent 65 is too large for 64-bit type 'long unsigned int'
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22807/files
- new: https://git.openjdk.org/jdk/pull/22807/files/93baeb1b..00239755
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22807&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22807&range=01-02
Stats: 220638 lines in 6033 files changed: 108098 ins; 88113 del; 24427 mod
Patch: https://git.openjdk.org/jdk/pull/22807.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22807/head:pull/22807
PR: https://git.openjdk.org/jdk/pull/22807
More information about the hotspot-runtime-dev
mailing list