RFR: 8360707: Globally enumerate all blobs, stubs and entries

Andrew Dinn adinn at openjdk.org
Tue Jul 1 08:37:43 UTC 2025


On Mon, 30 Jun 2025 20:27:53 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Use the blob, stub and entry declarations to generate a single global enumeration for all blobs, likewise for all stubs and all entries. Modify stub generators in shared runtime, c1 runtime, c2 runtime and stub generator subsystems and their clients to use those enumerations consistently.
>
> src/hotspot/cpu/x86/stubDeclarations_x86.hpp line 121:
> 
>> 119:                 vector_byte_shuffle_mask, vector_byte_shuffle_mask)     \
>> 120:   do_stub(compiler, vector_short_shuffle_mask)                          \
>> 121:   do_arch_entry(x86, compiler, vector_short_shuffle_mask,               \
> 
> Was it bug?

I think this was just a potential bug for the Leyden premain repo not an actual one for that repo and not a bug for mainline.

The declaration was attaching the entry to the wrong stub. I don't think this causes any problem, even in premain, because that wrong stub is still in the same blob as the correct stub. The bad declaration means that when premain saves and restores the entry address it will compute an offset from the wrong base address -- the one for the wrongly declared stub. That means the offset will identify a code address belonging to another stub i.e. it may be negative or greater than the extent of the declared owner. This won't cause a crash because it will still end up pointing at the desired address in the current blob. However, premain really ought to assert that the offset is non-negative and less than the associated stub's extent.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26004#discussion_r2176837367


More information about the hotspot-dev mailing list