RFR: 8230797: ARM32-softfp: assertion in InterpreterRuntime::resolve_ldc

David Holmes david.holmes at oracle.com
Thu Jul 1 01:44:54 UTC 2021


Hi Christoph,

On 24/06/2021 10:06 pm, Christoph Göttschkes wrote:
> Hi,
> 
> please review the following change, which was way too long on my chest. It fixes an assertion in the template interpreter for ARM32-softfp.
> 
> For ARM32-softfp, the template interpreter calls into the runtime to load a double constant using the ldc bytecode. After the interpreter loaded the constants, the assert block does some sanity checks on the cached constants. But if the double constant is the first constant to be loaded, the cache is not yet initialized and the check results in a SIGSEGV.
> 
> I guarded the usage of `ConstantPool::cp_to_object_index` by another check, which tests if there are any resolved references and if that's the case, the cache has already been initialized and the sanity checks can be performed.

Why isn't this something that should be fixed in the ARM code rather 
than the shared code? I admit I'm struggling to understand exactly how 
the problem arises - ldc is not to be used for long/double values.

Thanks,
David
-----

> -------------
> 
> Commit messages:
>   - Guard resolve ldc assertion.
> 
> Changes: https://git.openjdk.java.net/jdk/pull/4582/files
>   Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4582&range=00
>    Issue: https://bugs.openjdk.java.net/browse/JDK-8230797
>    Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
>    Patch: https://git.openjdk.java.net/jdk/pull/4582.diff
>    Fetch: git fetch https://git.openjdk.java.net/jdk pull/4582/head:pull/4582
> 
> PR: https://git.openjdk.java.net/jdk/pull/4582
> 


More information about the hotspot-runtime-dev mailing list