Cannot bit-shift a negative number in splitVector command

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2021-09-20
    • 128
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      jstestfuzz set a negative number for maxChunkSize in the splitVector command, which the command tries to bit shift left and runs into a runtime error. I think ensuring maxChunkSize is positive would fix the problem.

      Might also consider max long long values, wherein bit shifting might exceed the max value? Calling BSONElement::safeNumberLong() ensures we handle out of bound values for maxChunkSize, but then the code bit-shifts it further.

            Assignee:
            Pierlauro Sciarelli
            Reporter:
            Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: