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

some large compound $in sets won't trigger assertion due to integer overflow

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      The code for checking the size of the $in bounds set product doesn't handle an integer overflow.

       
      t = db.jstests_inc;
      t.drop();
       
      t.save( {} );
       
      inValues = [];
      for( i = 0; i < 256; ++i ) {
          inValues.push( i );
      }
       
      index = {};
      query = {};
      for( i = 0; i < 8; ++i ) {
          index[ '' + i ] = 1;
          query[ '' + i ] = { $in:inValues };
      }
      t.ensureIndex( index );
       
      assert.throws( function() { t.find( query ).hint( index ).itcount(); } );
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: