G1: Compare max_parallel_refinement_threads to UINT_MAX

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • gc
    • b27

      in g1Arguments.cpp:

        // Verify that the maximum parallelism isn't too high to eventually overflow
        // the refcount in G1CardSetContainer.
        uint max_parallel_refinement_threads = G1ConcRefinementThreads + G1DirtyCardQueueSet::num_par_ids();
        uint const divisor = 3; // Safe divisor; we increment by 2 for each claim, but there is a small initial value.
        if (max_parallel_refinement_threads > UINTPTR_MAX / divisor) {
          vm_exit_during_initialization("Too large parallelism for remembered sets.");
        }


      max_parallel_refinement_threads will always be less than UINTPTR_MAX on platforms where pointers are larger than unsigned. Use the intended UINT_MAX instead.

            Assignee:
            Leo Korinth
            Reporter:
            Leo Korinth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: