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

Fix sbe::vm::genericCompare() to be consistent about how it handles NaN

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.1
    • Sprint:
      QE 2021-10-18

      Description

      Before SERVER-58155, sbe::vm::genericCompare() always return false if either argument (or both arguments) was NaN.

      After SERVER-58155, if either argument (or both arguments) is NaN, in some cases sbe::vm::genericCompare() can return true. For example, if one argument is {NumberDouble, NaN} and the other argument is {NumberDecimal, NaN}, sbe::vm::genericCompare<std::equal_to<>>() returns true.

      The goal of this ticket is to fix this inconsistency.

        Attachments

          Activity

            People

            Assignee:
            andrew.paroski Drew Paroski
            Reporter:
            andrew.paroski Drew Paroski
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: