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

Vladimir Kozlov kvn at openjdk.org
Thu Jun 5 01:07:51 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

Thank you, Vladimir

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

PR Comment: https://git.openjdk.org/jdk/pull/25651#issuecomment-2942364593


More information about the hotspot-dev mailing list