RFR: 8333622: ubsan: relocInfo_x86.cpp:101:56: runtime error: pointer index expression with base (-1) overflowed

Vladimir Kozlov kvn at openjdk.org
Wed Jun 5 22:34:41 UTC 2024


On Wed, 5 Jun 2024 22:28:39 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Add missing check to `pd_call_destination()` similar to check in `pd_set_call_destination()` to avoid arithmetic with `(address)(-1)`.
> 
> Tested tier1-3,stress,xcomp

Note: current code works because pd_set_call_destination() ignores result of pd_call_destination() when destination address is -1: [relocInfo_x86.cpp#L120](https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/relocInfo_x86.cpp#L120)

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

PR Comment: https://git.openjdk.org/jdk/pull/19568#issuecomment-2151063495


More information about the hotspot-compiler-dev mailing list