RFR: 8361844: Build without C1 or C2 fails after 8360707 [v2]

Andrew Dinn adinn at openjdk.org
Thu Jul 10 13:27:40 UTC 2025


On Thu, 10 Jul 2025 12:38:55 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> After [JDK-8360707](https://bugs.openjdk.org/browse/JDK-8360707) builds which omit C1 or C2 can generate an exploded jdk which fails on startup with an assert:
>> 
>>     assert(idx2 >= 0 && idx2 >= idx1) failed: bad blob ids first -1 and second -1
>> 
>> The problem is that the blob and stub id verification expects the blob, stub and entry ranges in the C1 and C2 stub groups to be positive. However, when C1 or C2 is omitted the associated range starts and ends are NO_BLOBID, NO_STUBID and NO_ENTRYID (all -1) and this breaks some of the internal consistency checks that test the span of blob, stub and entry ranges.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   check for empty stub groups when dumping stub tables

Testing:

Built zero, image omitting c1 and image omitting c2 with this patch.

Ran tier1 tests in a C2-only build and they succeeded except for the following cases which look like they require both C1 and C2 to work as expected:

compiler.codecache.MHIntrinsicAllocFailureTest (threw NPE calling MemoryPoolMXBean.getUsage())
runtime/ErrorHandling/StackWalkNativeToJava.java (Count error: count was 1)
compiler/c2/irTests/ProfileAtTypeCheck.java (invalid IR -- enables TieredCompilation)
compiler/c2/irTests/TestLongRangeChecks.java (ditto)
compiler/c2/irTests/TestPrunedExHandler.java (ditto)
compiler/types/TestMeetIncompatibleInterfaceArrays.java (ditto)
jdk/test/lib/TestPlatformIsTieredSupported.java (it's not!)

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

PR Comment: https://git.openjdk.org/jdk/pull/26242#issuecomment-3057454334


More information about the hotspot-dev mailing list