Integrated: 8360942: [ubsan] aotCache tests trigger runtime error: applying non-zero offset 16 to null pointer in CodeBlob::relocation_end()

Vladimir Kozlov kvn at openjdk.org
Tue Jul 8 19:37:47 UTC 2025


On Mon, 7 Jul 2025 23:48:03 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> `CodeBlob::relocation_size()` is calculated as `(_mutable_data + _relocation_size - _mutable_data)`. `CodeBlob::relocation_size()` is called during AOT code loading before we allocate space for mutable data (the size is used to find how big space should be allocated). The expression at that point is `(NULL + _relocation_size - NULL)` which returns correct result. But we should just return `_relocation_size` which is recorded anyway in AOT data.
> 
> Added missing  `_mutable_data = blob_end();` initialization when we restore AOT code blob.
> 
> Fixed embarrassing typo in asserts.
> 
> Tested: tier1-6,8,10,xcomp,stress

This pull request has now been integrated.

Changeset: dedcce04
Author:    Vladimir Kozlov <kvn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/dedcce045013b3ff84f5ef8857e1a83f0c09f9ad
Stats:     7 lines in 2 files changed: 4 ins; 0 del; 3 mod

8360942: [ubsan] aotCache tests trigger runtime error: applying non-zero offset 16 to null pointer in CodeBlob::relocation_end()

Reviewed-by: adinn, mbaesken

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

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


More information about the hotspot-compiler-dev mailing list