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

PretouchTask num_chunks calculation can overflow

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b21
    • Verification:
      Verified

      Backports

        Description

        In PretouchTask::pretouch, the calculation for the number of chunks that need to be touched is

        (total_bytes + chunk_size - 1) / chunk_size

        The numerator can overflow if total_bytes and chunk_size are sufficiently large, leading to a result probably quite different from what's desired. It could even be zero, leading to requesting no threads being requested.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kbarrett Kim Barrett
                Reporter:
                kbarrett Kim Barrett
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: