SERVER-136285ClosedFixed

Possibly-dangling collator pointer after ExpressionSortArray clone

Prior to SERVER-119491 (added in 9.0), we had this cloneUsingNewExpCtx logic which used to serialise and reparse an expression tree using a new ExpressionContext. This re-creates the expression and therefore could not have pointers dangling to the previous expression context. After SERVER-119491, the clone method of all expressions was updated to accept a target ExpressionContext* for the cloned result. In clone(), ExpressionSortArray, ExpressionTopN, ExpressionTop, ExpressionBotton and Ex

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.0.79.1.0-rc1026
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.