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

Assert the same limits are used in parse_xss and globals.hpp

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b13

      Description

      Today we have the following in parse_xss:
        // The min and max sizes match the values in globals.hpp, but scaled
        // with K. The values have been chosen so that alignment with page
        // size doesn't change the max value, which makes the conversions
        // back and forth between Xss value and ThreadStackSize value easier.
        // The values have also been chosen to fit inside a 32-bit signed type.
        const julong min_ThreadStackSize = 0;
        const julong max_ThreadStackSize = 1 * M;

      and the corresponding values in globals.hpp:
        product_pd(intx, ThreadStackSize, \
                "Thread Stack Size (in Kbytes)") \
                range(0, 1 * M) \

      The values (0, 1*M) are duplicated in both files. However, seeing the actual values will make the comment easier to understand. Let's add an assert here to make we have the same values in both places.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: