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

    • 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

      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.

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

              Created:
              Updated:
              Resolved: