Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4525

Integer overflow in GroupBy execution

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.13.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      During the execution of group by we adjust memory for the internal cache to keep all unique keys. We're increasing the number of keys by 1.5 factor and calculate how much space we need for it using SizedUtil.sizeOfMap, which is using ints as parameters and returns long. But since we are using all ints during the calculation, the integer overflow may happen and the method would return a negative value. As the result the query would fail, reporting that unable to allocate cache with negative size.

        Attachments

        1. PHOENIX-4525-2.patch
          2 kB
          Sergey Soldatov
        2. PHOENIX-4525.patch
          1 kB
          Sergey Soldatov

          Activity

            People

            • Assignee:
              sergey.soldatov Sergey Soldatov
              Reporter:
              sergey.soldatov Sergey Soldatov
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: