[SERVER-30571] EphemeralForTest oplogStartHack segfaults if startingPosition is behind oplog Created: 08/Aug/17  Updated: 30/Oct/23  Resolved: 09/Aug/17

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.5.12

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-08-21
Participants:

 Description   

    Records::const_iterator it = records.lower_bound(startingPosition);
    if (it == records.end() || it->first > startingPosition)
        --it;
 
    return it->first;

This loop should first check that it != records.begin(). Otherwise --it will fall off the front of the map.



 Comments   
Comment by Githook User [ 09/Aug/17 ]

Author:

{'username': 'judahschvimer', 'email': 'judah@mongodb.com', 'name': 'Judah Schvimer'}

Message: SERVER-30571 EphemeralForTest oplogStartHack works if startingPosition is behind oplog
Branch: master
https://github.com/mongodb/mongo/commit/23bd7f71c3b9d7f29db1955cdb884002fe96b7ee

Generated at Thu Feb 08 04:24:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.