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

FilteringClientCursor ctor bug

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.3
    • Internal Client
    • None
    • Fully Compatible
    • ALL

    Description

      FilteringClientCursor::FilteringClientCursor( auto_ptr<DBClientCursor> cursor , const BSONObj filter )
      : _matcher( filter ) , _cursor( cursor ) , _pcmData( NULL ), _done( cursor.get() == 0 ) {
      }

      The order of calling copy constructor for _cursor and evaluation of the expression ( cursor.get() == 0 ) above is not guaranteed. The problem is that copy constructor for auto_ptr resets the original.

      Attachments

        Activity

          People

            tyler@10gen.com Tyler Brock
            vova Vladimir Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: