When building with ubsan (configure option --enable-ubsan) on macOS x86_64 we run into the following error :
/jdk/src/hotspot/share/gc/g1/g1CardSetContainers.inline.hpp:266:5: runtime error: index 2 out of bounds for type 'G1CardSetHowl::ContainerPtr [2]'
#0 0x1051c5c1c in G1CardSetHowl::G1CardSetHowl(unsigned int, G1CardSetConfiguration*) g1CardSetContainers.inline.hpp:266
#1 0x1051c2f42 in G1CardSet::create_coarsened_array_of_cards(unsigned int, bool) g1CardSet.cpp:596
#2 0x1051c2702 in G1CardSet::coarsen_container(void* volatile*, void*, unsigned int, bool) g1CardSet.cpp:610
#3 0x1051c3780 in G1CardSet::add_card(unsigned int, unsigned int, bool) g1CardSet.cpp:797
#4 0x10520db1d in void OopOopIterateDispatch<G1RebuildRemSetClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>(G1RebuildRemSetClosure*, oopDesc*, Klass*) iterator.inline.hpp:110
#5 0x1052075fc in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_object(HeapRegion*, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:159
#6 0x1052071f7 in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_and_scrub_to_pb(HeapRegion*, HeapWordImpl**, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:186
#7 0x1052067d6 in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_and_scrub_region(HeapRegion*, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:234
#8 0x1052546f6 in HeapRegionManager::par_iterate(HeapRegionClosure*, HeapRegionClaimer*, unsigned int) const g1HeapRegionManager.cpp:599
#9 0x105205a18 in G1RebuildRSAndScrubTask::work(unsigned int) g1ConcurrentRebuildAndScrub.cpp:341
#10 0x105e4d6fa in WorkerTaskDispatcher::worker_run_task() workerThread.cpp:70
#11 0x105e4df77 in WorkerThread::run() workerThread.cpp:201
#12 0x105d31116 in Thread::call_run() thread.cpp:221
#13 0x10593eb64 in thread_native_entry(Thread*) os_bsd.cpp:598
#14 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
#15 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)
/jdk/src/hotspot/share/gc/g1/g1CardSetContainers.inline.hpp:266:5: runtime error: index 2 out of bounds for type 'G1CardSetHowl::ContainerPtr [2]'
#0 0x1051c5c1c in G1CardSetHowl::G1CardSetHowl(unsigned int, G1CardSetConfiguration*) g1CardSetContainers.inline.hpp:266
#1 0x1051c2f42 in G1CardSet::create_coarsened_array_of_cards(unsigned int, bool) g1CardSet.cpp:596
#2 0x1051c2702 in G1CardSet::coarsen_container(void* volatile*, void*, unsigned int, bool) g1CardSet.cpp:610
#3 0x1051c3780 in G1CardSet::add_card(unsigned int, unsigned int, bool) g1CardSet.cpp:797
#4 0x10520db1d in void OopOopIterateDispatch<G1RebuildRemSetClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>(G1RebuildRemSetClosure*, oopDesc*, Klass*) iterator.inline.hpp:110
#5 0x1052075fc in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_object(HeapRegion*, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:159
#6 0x1052071f7 in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_and_scrub_to_pb(HeapRegion*, HeapWordImpl**, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:186
#7 0x1052067d6 in G1RebuildRSAndScrubTask::G1RebuildRSAndScrubRegionClosure::scan_and_scrub_region(HeapRegion*, HeapWordImpl**) g1ConcurrentRebuildAndScrub.cpp:234
#8 0x1052546f6 in HeapRegionManager::par_iterate(HeapRegionClosure*, HeapRegionClaimer*, unsigned int) const g1HeapRegionManager.cpp:599
#9 0x105205a18 in G1RebuildRSAndScrubTask::work(unsigned int) g1ConcurrentRebuildAndScrub.cpp:341
#10 0x105e4d6fa in WorkerTaskDispatcher::worker_run_task() workerThread.cpp:70
#11 0x105e4df77 in WorkerThread::run() workerThread.cpp:201
#12 0x105d31116 in Thread::call_run() thread.cpp:221
#13 0x10593eb64 in thread_native_entry(Thread*) os_bsd.cpp:598
#14 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
#15 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)
- duplicates
-
JDK-8331919 ubsan: g1CardSetContainers.inline.hpp:266:5: runtime error: index 2 out of bounds for type 'G1CardSetHowl::ContainerPtr [2]' reported
- Closed
- relates to
-
JDK-8332683 G1: G1CardSetArray::EntryDataType [2] triggers ubsan runtime errors
- Resolved