[SERVER-51385] Ensure that vector is initialized before setting vector as output of std::transform Created: 06/Oct/20 Updated: 29/Oct/23 Resolved: 07/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Blake Oler | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M1, PM-234-T-lifecycle | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Sharding 2020-10-19 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
There are a few valid ways to output to a newly declared vector from std::transform. For example:
If one attempts to use std::transform on an uninitialized vector without using std::back_inserter, std::transform will induce a segfault attempting to index into memory that hasn't yet been allocated. This ticket is to fix an instance of that bug in Resharding code. |
| Comments |
| Comment by Githook User [ 07/Oct/20 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |
| Comment by Blake Oler [ 06/Oct/20 ] |
|
CC haley.connelly. I had no idea this was a thing until today! |