Running gc/g1/TestFromCardCacheIndex.java on macosx with the smallest possible card size (-XX:GCCardSizeInBytes=128) triggers the following assertion failure:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (src/hotspot/share/utilities/globalDefinitions.hpp:474), pid=97498, tid=9987
# assert(left >= right) failed: avoid underflow - left: 0x000000010442b000 right: 0xfffffffd0441b000
#
# JRE version: (23.0+22) (fastdebug build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-ea+22-1824, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
Stack: [0x000070000d1fd000,0x000070000d2fd000], sp=0x000070000d2fc820, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x124a604] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x5a4 (globalDefinitions.hpp:474)
V [libjvm.dylib+0x124add8] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x38
V [libjvm.dylib+0x651164] report_vm_error(char const*, int, char const*, char const*, ...)+0xb4
V [libjvm.dylib+0x78d83f] G1BlockOffsetTable::update_for_block_work(HeapWordImpl**, HeapWordImpl**)+0x64f
V [libjvm.dylib+0x7a9e32] HeapRegion::update_bot()+0x182
V [libjvm.dylib+0x79d5fb] G1CollectedHeap::populate_archive_regions_bot(MemRegion)+0x13b
V [libjvm.dylib+0x27031c] ArchiveHeapLoader::fixup_region()+0x1c
V [libjvm.dylib+0x12436b0] vmClasses::resolve_all(JavaThread*)+0xc0
V [libjvm.dylib+0x1141055] SystemDictionary::initialize(JavaThread*)+0xb5
V [libjvm.dylib+0x11cb2a6] Universe::genesis(JavaThread*)+0xc6
V [libjvm.dylib+0x11d0b72] universe2_init()+0x22
V [libjvm.dylib+0x91ecab] init_globals2()+0xb
V [libjvm.dylib+0x11a258f] Threads::create_vm(JavaVMInitArgs*, bool*)+0x2ff
V [libjvm.dylib+0xa70f55] JNI_CreateJavaVM+0x55
C [libjli.dylib+0x4292] JavaMain+0x112
C [libjli.dylib+0x74c9] ThreadJavaMain+0x9
C [libsystem_pthread.dylib+0x6202] _pthread_start+0x63
C [libsystem_pthread.dylib+0x1bab] thread_start+0xf
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (src/hotspot/share/utilities/globalDefinitions.hpp:474), pid=97498, tid=9987
# assert(left >= right) failed: avoid underflow - left: 0x000000010442b000 right: 0xfffffffd0441b000
#
# JRE version: (23.0+22) (fastdebug build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-ea+22-1824, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
Stack: [0x000070000d1fd000,0x000070000d2fd000], sp=0x000070000d2fc820, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x124a604] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x5a4 (globalDefinitions.hpp:474)
V [libjvm.dylib+0x124add8] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x38
V [libjvm.dylib+0x651164] report_vm_error(char const*, int, char const*, char const*, ...)+0xb4
V [libjvm.dylib+0x78d83f] G1BlockOffsetTable::update_for_block_work(HeapWordImpl**, HeapWordImpl**)+0x64f
V [libjvm.dylib+0x7a9e32] HeapRegion::update_bot()+0x182
V [libjvm.dylib+0x79d5fb] G1CollectedHeap::populate_archive_regions_bot(MemRegion)+0x13b
V [libjvm.dylib+0x27031c] ArchiveHeapLoader::fixup_region()+0x1c
V [libjvm.dylib+0x12436b0] vmClasses::resolve_all(JavaThread*)+0xc0
V [libjvm.dylib+0x1141055] SystemDictionary::initialize(JavaThread*)+0xb5
V [libjvm.dylib+0x11cb2a6] Universe::genesis(JavaThread*)+0xc6
V [libjvm.dylib+0x11d0b72] universe2_init()+0x22
V [libjvm.dylib+0x91ecab] init_globals2()+0xb
V [libjvm.dylib+0x11a258f] Threads::create_vm(JavaVMInitArgs*, bool*)+0x2ff
V [libjvm.dylib+0xa70f55] JNI_CreateJavaVM+0x55
C [libjli.dylib+0x4292] JavaMain+0x112
C [libjli.dylib+0x74c9] ThreadJavaMain+0x9
C [libsystem_pthread.dylib+0x6202] _pthread_start+0x63
C [libsystem_pthread.dylib+0x1bab] thread_start+0xf