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

Coverity analysis defect 115212: Wrong operator used

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0, 4.4.2
    • Affects Version/s: None
    • Component/s: Catalog
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-08-24

      Wrong operator used

      Inadvertent use of the wrong operator results in a likely logic error. Common interchanges include bit-or and bit-and, left-shift and right-shift. Wrong operator used in expression
      /src/mongo/db/commands/dbcommands.cpp:356: CONSTANT_EXPRESSION_RESULT 115212 "opCtx->getClient()>session()>getTags() | 2U /* mongo::transport::Session::kInternalClient */" is always 1/true regardless of the values of its operand. This occurs as the logical second operand of "||".

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: