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

Potentially unexpected amount of extra data in MethodData

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 15
    • 14
    • hotspot

      The changes in JDK-8233702 added a clamp() function to clamp a value between given min and max, with the assert checking whether min <= max.

      Attempting to use this method in

      methodData.cpp:

      int MethodData::compute_extra_data_count(int data_size, int empty_bc_count, bool needs_speculative_traps) {

      933: int extra_data_count = MIN2(empty_bc_count, MAX2(4, (empty_bc_count * 30) / 100));

      caused the assert to fail (assuming extra_data_count should be bounded by [4...empy_bc_count]) which indicates a potential issue with the calculation, i.e. unexpected return values.

      Please look at the method/calculation and if the clamp() method should be used, and if so use it after fixing the code.

            thartmann Tobias Hartmann
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: