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

$type with invalid integer type code fails with unhelpful message and leaks memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.2.4, 3.3.2
    • Querying
    • Fully Compatible
    • ALL
    • Hide

      db.c.drop();
      db.c.ensureIndex({a: 1});
      db.c.find({a: { $type: -100663046}}).hint({a: 1}).itcount();
      

      Show
      db.c.drop(); db.c.ensureIndex({a: 1}); db.c.find({a: { $type: -100663046}}).hint({a: 1}).itcount();
    • Query 10 (02/22/16)
    • 0

    Description

      The $type MatchExpression parsing code fails to validate that the numerical type code is valid. This leads to an unexpected exception being thrown inside the query planner, which in turn leaks memory.

      Attachments

        Issue Links

          Activity

            People

              david.storch@mongodb.com David Storch
              david.storch@mongodb.com David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: