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

G1: Undefined behavior for G1ConfidencePercent=0

XMLWordPrintable

    • gc
    • b09

      When running with ubsan-enabled binaries, the following issue is reported :
      In test
      gc/arguments/TestG1PercentageOptions.java
      seems to be this line
        const double safety_factor = (100.0 / G1ConfidencePercent) * (100 + TargetPLABWastePct) / 100.0;

      jdk/src/hotspot/share/gc/g1/g1Policy.cpp:154:41: runtime error: division by zero
          #0 0x7fa45c3c8aad in G1YoungLengthPredictor::will_fit(unsigned int) const src/hotspot/share/gc/g1/g1Policy.cpp:154
          #1 0x7fa45c3c8aad in G1Policy::calculate_desired_eden_length_before_young_only(double, unsigned int, unsigned int) const src/hotspot/share/gc/g1/g1Policy.cpp:429
          #2 0x7fa45dc70354 in G1Policy::calculate_desired_eden_length_by_pause(double, unsigned int, unsigned int) const src/hotspot/share/gc/g1/g1Policy.cpp:405
          #3 0x7fa45dc70354 in G1Policy::calculate_young_desired_length(unsigned long, unsigned long, unsigned long) const src/hotspot/share/gc/g1/g1Policy.cpp:277
          #4 0x7fa45dc70cf8 in G1Policy::update_young_length_bounds(unsigned long, unsigned long, unsigned long) src/hotspot/share/gc/g1/g1Policy.cpp:198
          #5 0x7fa45dc70cf8 in G1Policy::update_young_length_bounds() src/hotspot/share/gc/g1/g1Policy.cpp:190
          #6 0x7fa45dc7bd5f in G1Policy::init(G1CollectedHeap*, G1CollectionSet*) src/hotspot/share/gc/g1/g1Policy.cpp:103
          #7 0x7fa45da82c83 in G1CollectedHeap::initialize() src/hotspot/share/gc/g1/g1CollectedHeap.cpp:1387
          #8 0x7fa45f9c5fdd in universe_init() src/hotspot/share/memory/universe.cpp:859
          #9 0x7fa45df5a2e5 in init_globals() src/hotspot/share/runtime/init.cpp:130
          #10 0x7fa45f94795b in Threads::create_vm(JavaVMInitArgs*, bool*) src/hotspot/share/runtime/threads.cpp:550
          #11 0x7fa45e2809bf in JNI_CreateJavaVM_inner src/hotspot/share/prims/jni.cpp:3581
          #12 0x7fa45e2809bf in JNI_CreateJavaVM src/hotspot/share/prims/jni.cpp:3672
          #13 0x7fa46443dae5 in InitializeJVM src/java.base/share/native/libjli/java.c:1592
          #14 0x7fa46443dae5 in JavaMain src/java.base/share/native/libjli/java.c:505
          #15 0x7fa464446468 in ThreadJavaMain src/java.base/unix/native/libjli/java_md.c:653
          #16 0x7fa4643da6e9 in start_thread (/lib64/libpthread.so.0+0xa6e9) (BuildId: 9a146bd267419cb6a8cf08d7c602953a0f2e12c5)
          #17 0x7fa463ce358e in clone (/lib64/libc.so.6+0x11858e) (BuildId: f2d1cb1ef49f8c47d43a4053910ba6137673ccce)

            tschatzl Thomas Schatzl
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: