[SERVER-74889] Fix memory leak in SBE setField Created: 15/Mar/23 Updated: 29/Oct/23 Resolved: 23/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Amr Elhelw |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | QE 2023-04-03 |
| Participants: |
| Description |
|
The early return in ByteCode::setField would lead to a memory leak. newTag, newVal would not be deleted. A value guard should be added. I don't think there is a way to pass setField a non-string field, so this isn't being hit, which is why we aren't seeing the issue in ASAN. |
| Comments |
| Comment by Githook User [ 23/Mar/23 ] |
|
Author: {'name': 'Amr Elhelw', 'email': 'amr.elhelw@mongodb.com', 'username': 'aelhelw'}Message: |