SERVER-134356ClosedFixed

Reduce SlotBasedStageBuilder::buildGroup stack frame and max number of DocumentSource stages pushed to SBE

BF-46094 exposed a stack-overflow risk in recursive SBE aggregation lowering on ARM64 after the SERVER-110427 PGO profile refresh. The failing test constructs a legal 1,000-stage aggregation pipeline. Each $group is lowered through SlotBasedStageBuilder::buildGroup(), which recursively calls build() for the child. The PGO/BOLT layout change appears to move the optimized binary across the stack-use threshold; the failure surfaces in computeChildReqsForGroup()/PlanStageReqs::setResultObj() as a

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10248.3.169.0.7
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.