Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74537

Coverity analysis defect 135326: Bad bit shift operation

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Optimization
    • ALL

      Bad bit shift operation

      The operation may have an undefined behavior or yield an unexpected result. A bit shift operation has a shift amount which is too large or has a negative value.
      /src/mongo/db/query/optimizer/cascades/logical_rewriter.cpp:1346: BAD_SHIFT 135326 Assigning: "reqSize" = "reqMap->numConjuncts()". The value of "reqSize" is now 0.
      /src/mongo/db/query/optimizer/cascades/logical_rewriter.cpp:1347: BAD_SHIFT 135326 In expression "1ULL << reqSize - 1UL", shifting by a negative amount has undefined behavior. The shift amount, "reqSize - 1UL", is -1.

            Assignee:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: