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

G1: Compare max_parallel_refinement_threads to UINT_MAX

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 18
    • 18
    • hotspot
    • gc
    • b27

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: