[SERVER-51809] ReshardingRecipientServiceTest setup can access freed memory Created: 22/Oct/20  Updated: 29/Oct/23  Resolved: 25/Nov/20

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

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-11-02, Sharding 2020-11-16, Sharding 2020-11-30
Participants:
Linked BF Score: 45

 Description   

The test inherits from two different test fixtures, ServiceContextMongoDTest and CatalogCacheTestFixture. During setup of the first, the JournalFlusher background thread is started, which will asynchronously create an operation context, which takes a raw pointer to the service context's tick source and shortly after calls getTicks() on it. During setup of the second, the tick source of the global service context is set to a mock tick source, which triggers destruction of the original tick source and can lead the JournalFlusher to access freed memory.



 Comments   
Comment by Githook User [ 25/Nov/20 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-51809 Change inheritance order for ReshardingRecipientServiceTest
Branch: master
https://github.com/mongodb/mongo/commit/a194505325087b1e841fdee55c51312a042ce9d2

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