Integrated: 8354428: [ubsan] g1BiasedArray.hpp: pointer overflow in address calculation

Thomas Schatzl tschatzl at openjdk.org
Wed May 28 06:57:56 UTC 2025


On Mon, 26 May 2025 10:15:01 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this fix for an ubsan error related to pointer under- or overflows when using the biased array helper.
> 
> The fix is, instead of using direct address calculations that can cause these errors, use `uintptr_t` where the overflow behavior is defined in C++. Only convert to pointer at the actual access.
> 
> Testing: gha, tier1

This pull request has now been integrated.

Changeset: db515566
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/db515566875b92bd4aff08cccc80d80b85f01514
Stats:     18 lines in 4 files changed: 0 ins; 5 del; 13 mod

8354428: [ubsan] g1BiasedArray.hpp: pointer overflow in address calculation

Reviewed-by: ayang, kbarrett, mbaesken

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

PR: https://git.openjdk.org/jdk/pull/25447


More information about the hotspot-gc-dev mailing list