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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.2.0, 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: