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

Crash if undefined is passed in collation.backwards parameter

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

      Start mongod and execute:

      db.batch_write_collation_estsize.bulkWrite([{
          updateOne: {
              filter: { str: 'FOO' },
              update: { $set: { str: 'BAR' } },
              collation: {
                  locale: 'en_US',
                  caseLevel: false,
                  caseFirst: 'off',
                  strength: 3,
                  alternate: 'non-ignorable',
                  maxVariable: 'punct',
                  normalization: false,
                  backwards: undefined
              }
          }
      }])
      

      (This code was generated by the JS fuzzer.)
      mongod crashes:

      "msg":"Invariant failure","attr":{"expr":"collation->getBackwards().is_initialized()","file":"src/mongo/db/query/collation/collator_factory_icu.cpp","line":399
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: