Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      4
    • Last comment by Customer:
      true

      Description

      In WiredTiger we have macros for dealing with bitwise flags called F_SET (to set a flag) and F_ISSET (to check whether a flag is set). It is easy to confuse these two, and accidentally set a flag when intending to check for it.

      Make F_SET (and F_CLR while we're in the neighborhood) into void expressions to avoid this class of bug.

        Activity

        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

        Message: WT-2189 Make F_SET (and F_CLR) into a void expression.

        That way it can't accidentally be used in place of F_ISSET.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/43374146ed6d69d3fa04e1d46ff5963d0d9b3501

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: WT-2189 Make F_SET (and F_CLR) into a void expression. That way it can't accidentally be used in place of F_ISSET. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/43374146ed6d69d3fa04e1d46ff5963d0d9b3501
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

        Message: Merge pull request #2274 from wiredtiger/WT-2189

        WT-2189 Make F_SET (and F_CLR) into a void expression.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/a4545bff70f6014f449e63b2f40534d460d95273

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2274 from wiredtiger/ WT-2189 WT-2189 Make F_SET (and F_CLR) into a void expression. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/a4545bff70f6014f449e63b2f40534d460d95273
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

        Message: Merge pull request #2274 from wiredtiger/WT-2189

        WT-2189 Make F_SET (and F_CLR) into a void expression.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/a4545bff70f6014f449e63b2f40534d460d95273

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2274 from wiredtiger/ WT-2189 WT-2189 Make F_SET (and F_CLR) into a void expression. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/a4545bff70f6014f449e63b2f40534d460d95273
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

        Message: WT-2189 Reset the maximum transaction for each reconciliation.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/78f504e4f3f9393726f01019e1c6f939b72ff435

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: WT-2189 Reset the maximum transaction for each reconciliation. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/78f504e4f3f9393726f01019e1c6f939b72ff435

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 20 weeks, 6 days ago
              Date of 1st Reply: