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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.1
    • QE 2021-10-18

      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.

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

              Created:
              Updated:
              Resolved: