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

Coverity analysis defect 115212: Wrong operator used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.7.0, 4.4.2
    • Catalog
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-08-24

    Description

      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 "||".

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: