[SERVER-55480] min/max window function accesses value after std::move Created: 24/Mar/21  Updated: 29/Oct/23  Resolved: 29/Mar/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Nicholas Zolnierz
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: Query Optimization 2021-04-05
Participants:

 Description   

https://github.com/mongodb/mongo/blob/7cfa7de2c1b8cefa90e0b6f4a24f13a0aa3c448a/src/mongo/db/pipeline/window_function/window_function_min_max.h#L53

After the std::move, the Value turns to missing and the memory tracking is incorrect



 Comments   
Comment by Githook User [ 29/Mar/21 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-55480 Fix use-after-move in min max window functions
Branch: master
https://github.com/mongodb/mongo/commit/57ea3472d0ce10032636872c00c944422d68046b

Generated at Thu Feb 08 05:36:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.