Info
[SERVER-15343] Calling advance() on EOF cursor causes segfault in mmapv1
Top User Comments
xgen-internal-githook commented on Mon, 22 Sep 2014 18:38:12 +0000:
Author:
{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}
Message: SERVER-15343 Advance cursor only if not at EOF already.
Closes #788
Signed-off-by: Benety Goh
Branch: master
https://github.com/mongodb/mongo/commit/b5574b7ea9346f89262735b2aafb51680b2d40f6
Steps to Reproduce
Relevant snippet of test case extracted below.
scoped_ptr harnessHelper( newHarnessHelper() );
scoped_ptr sorted( harnessHelper->newSortedDataInterface() );
scoped_ptr opCtx( harnessHelper->newOperationContext() );
scoped_ptr cursor( sorted->newCursor( opCtx.get(), 1 ) );
cursor->locate( BSONObj(), minDiskLoc );
cursor->advance();