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

Do not use double as map key, it may trigger unexpected behavior

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0 Required
    • Affects Version/s: 4.0 Required
    • Component/s: None
    • None
    • Fully Compatible
    • ALL

      Depending on platform, standard library and CPU microcode, comparing 2 "equal" doubles can yield unexpected results. Double should never be used as a key in container.

      The fix should be here:
      https://github.com/mongodb/mongo/blob/124ee49878b8fe8a43fda758408178be9db0ccf5/src/mongo/client/connpool.h#L400

            Assignee:
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Reporter:
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: