Details
Description
_shardsvrReshardCollection constructs a ReshardCollectionCoordinator passing as argument 'request()', which contains non-owned BSON objects (in particular, 'key' and 'collation'. ReshardCollectionCoordinator makes a copy of the ShardsvrReshardCollection object, but the mentioned BSON objects are still unowned. Thus, if ReshardCollectionCoordinator outlives the _shardsvrReshardCollection command, a crash can happen because the underlying bson objects are dangling.