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

DiskLoc56Bit::Z accesses bytes not owned by current DiskLoc56Bit object

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      In https://github.com/mongodb/mongo/blob/57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5/src/mongo/db/btree.h#L194

      DiskLoc56Bit::Z does an 8 byte read from a reinterpret_cast'ed this pointer. However, a DiskLoc56Bit is only 7 bytes long, so this is undefined behavior.

      The 'Z' method should be rewritten to only access the bytes owned by the current DiskLoc56Bit.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: