Integrated: 8358632: [asan] reports heap-buffer-overflow in AOTCodeCache::copy_bytes

Vladimir Kozlov kvn at openjdk.org
Thu Jun 5 03:28:57 UTC 2025


On Thu, 5 Jun 2025 00:18:50 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> AOTCodeCache::copy_bytes() tries to optimize by copying byte buffer using HeapWords (64bits) by rounding up the size which may access memory after buffer.
> 
> We should use memcpy() instead.
> 
> I also fixed output match pattern in test because oop base address is hexadecimal value. I fixed in in leyden/premain branch and forgot to port into mainline. During testing the fix I hit this issue.
> 
> Testing tier1-3,xcomp,stress

This pull request has now been integrated.

Changeset: 849655a1
Author:    Vladimir Kozlov <kvn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/849655a145a40b056a751528cebc78a11481514c
Stats:     13 lines in 2 files changed: 0 ins; 9 del; 4 mod

8358632: [asan] reports heap-buffer-overflow in AOTCodeCache::copy_bytes

Reviewed-by: vlivanov, iveresov

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

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


More information about the hotspot-dev mailing list