Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8332683

G1: G1CardSetArray::EntryDataType [2] triggers ubsan runtime errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • hotspot
    • gc
    • b25

      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:199:3: runtime error: index 2 out of bounds for type 'G1CardSetArray::EntryDataType [2]'
          #0 0x110c42628 in G1CardSetArray::add(unsigned int) g1CardSetContainers.inline.hpp:199
          #1 0x110c42ad7 in G1CardSet::add_to_container(void* volatile*, void*, unsigned int, unsigned int, bool) g1CardSet.cpp:731
          #2 0x110c43c3a in G1CardSet::add_card(unsigned int, unsigned int, bool) g1CardSet.cpp:791
          #3 0x110c47e7c in void G1CardSetInlinePtr::iterate<G1TransferCard>(G1TransferCard&, unsigned int) g1CardSetContainers.inline.hpp:115
          #4 0x110c4374b in void G1CardSet::iterate_cards_during_transfer<G1TransferCard>(void*, G1TransferCard&) g1CardSet.cpp:908
          #5 0x110c436ae in G1CardSet::transfer_cards(G1CardSetHashTableValue*, void*, unsigned int) g1CardSet.cpp:674
          #6 0x110c43da4 in G1CardSet::add_card(unsigned int, unsigned int, bool) g1CardSet.cpp:817
          #7 0x110d2bf1d in void ObjArrayKlass::oop_oop_iterate_elements<narrowOop, G1ConcurrentRefineOopClosure>(objArrayOopDesc*, G1ConcurrentRefineOopClosure*) objArrayKlass.inline.hpp:45
          #8 0x110d21ebc in HeapWordImpl** HeapRegion::oops_on_memregion_iterate<G1ConcurrentRefineOopClosure, false>(MemRegion, G1ConcurrentRefineOopClosure*) g1HeapRegion.inline.hpp:442
          #9 0x110d0f234 in G1RemSet::refine_card_concurrently(unsigned char*, unsigned int) g1RemSet.cpp:1590
          #10 0x110c988c1 in G1RefineBufferedCards::refine_cleaned_cards(unsigned long) g1DirtyCardQueue.cpp:412
          #11 0x110c97dc6 in G1DirtyCardQueueSet::refine_buffer(BufferNode*, unsigned int, G1ConcurrentRefineStats*) g1DirtyCardQueue.cpp:461
          #12 0x110c97fb8 in G1DirtyCardQueueSet::refine_completed_buffer_concurrently(unsigned int, unsigned long, G1ConcurrentRefineStats*) g1DirtyCardQueue.cpp:524
          #13 0x110c95eae in G1PrimaryConcurrentRefineThread::do_refinement_step() g1ConcurrentRefineThread.cpp:176
          #14 0x110c9560a in G1ConcurrentRefineThread::run_service() g1ConcurrentRefineThread.cpp:74
          #15 0x110882ae1 in ConcurrentGCThread::run() concurrentGCThread.cpp:48
          #16 0x1117b1116 in Thread::call_run() thread.cpp:221
          #17 0x1113beb64 in thread_native_entry(Thread*) os_bsd.cpp:598
          #18 0x7fff204338fb in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x68fb)
          #19 0x7fff2042f442 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x2442)

            iwalulya Ivan Walulya
            iwalulya Ivan Walulya
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: