[SERVER-45207] Address of stack memory associated with local variable 'replOperation' returned to caller Created: 17/Dec/19 Updated: 29/Oct/23 Resolved: 11/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Alexander Taskov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-4.4-stabilization, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Sharding 2020-03-23 | ||||
| Participants: | |||||
| Description |
|
I run clang-tidy locally in vim and it caught that in this function we take an input parameter by copy and then return a reference to its memory (which is bad because the temporary object will be destroyed when it goes out of scope. We should fix this. |
| Comments |
| Comment by Githook User [ 16/Mar/20 ] |
|
Author: {'name': 'Alex Taskov', 'username': 'alextaskov', 'email': 'alex.taskov@mongodb.com'}Message: (cherry picked from commit ea86f6a717036652450fab61aa6a60bb7d3f7dd3) |
| Comment by Githook User [ 11/Mar/20 ] |
|
Author: {'name': 'Alex Taskov', 'username': 'alextaskov', 'email': 'alex.taskov@mongodb.com'}Message: |
| Comment by Ratika Gandhi [ 20/Dec/19 ] |
|
acm, we'll file a separate ticket to turn on additional clang tidy checks. |