RFR: 8321509: False positive in get_trampoline fast path causes crash

Evgeny Astigeevich eastigeevich at openjdk.org
Tue Jul 9 17:04:34 UTC 2024


On Tue, 25 Jun 2024 06:36:53 GMT, Dean Long <dlong at openjdk.org> wrote:

> AArch64 binds some trampoline call-sites early, thanks to its is_always_within_branch_range() check. This allows a false positive match with a trampoline stub during code buffer expansion in rare situations.

I am looking at the fix. I am not sure it is a proper fix.
`is_always_within_branch_range()` returns a value based on a static configuration of CodeCache. The returned value stays correct independent from CodeBuffer expansion.
I think the problem might be that `CodeBuffer::relocate_code_to` assumes the  destination gets the final layout. So using it for CodeBuffer which is not finalized might be a problem. I have had issues with the function when I tried to implement relocation of nmethods to different places of CodeCache.

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

PR Comment: https://git.openjdk.org/jdk/pull/19796#issuecomment-2218240128


More information about the hotspot-compiler-dev mailing list