RFR: 8331920: ubsan: g1CardSetContainers.inline.hpp:266:5: runtime error: index 2 out of bounds for type 'G1CardSetHowl::ContainerPtr [2]' reported

Thomas Schatzl tschatzl at openjdk.org
Tue May 21 07:19:02 UTC 2024


On Mon, 20 May 2024 08:17:41 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

> Hi all,
> 
> Please review this change to improve access to G1CardSetContainer VLA elements. Instead of  straightforward indexing, we obscure access through a base pointer and offsets to reduce the possibility of UB. 
> 
> Testing: Tier 1-3
>               - Local testing on Mac with `--enable-ubsan`.

I think this is good.

However I am not sure why ubsan did not complain about the `_data` member of `G1CardSetArray` the same way.

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

Marked as reviewed by tschatzl (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19300#pullrequestreview-2067732814


More information about the hotspot-gc-dev mailing list