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

PretouchTask num_chunks calculation can overflow

XMLWordPrintable

    • gc
    • b21
    • Verified

        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.

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

                Created:
                Updated:
                Resolved: