[SERVER-62495] Ensure that CompileCtx::accumulator is set before accessing it Created: 10/Jan/22  Updated: 26/Jul/22  Resolved: 26/Jul/22

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

Type: Improvement Priority: Minor - P4
Reporter: Anna Wawrzyniak Assignee: Erin Zhu
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-59960 Ensure CompileCtx::root is set before... Closed
Sprint: QE 2022-06-27, QE 2022-07-11, QE 2022-07-25, QE 2022-08-08
Participants:

 Description   

CompileCtx::accumulator is accessed when compiling EFunction related to aggregate.

This requires a corresponding assignment before the compile is called, like in HashAggStage::prepare

 
Otherwise, CompileCtx::accessor is optional.

At minimum we should assert that the CompileCtx::accessor is set to prevent segfault.



 Comments   
Comment by Githook User [ 24/Jun/22 ]

Author:

{'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}

Message: SERVER-62495 Added assert statement to check that ctx.accumulator is set before access
Branch: master
https://github.com/mongodb/mongo/commit/d7e4648b8b5b9fa3f7f5f6fe422f6ece49f22b90

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