[SERVER-29804] Undefined behaviour in the sharding catalog unit-tests Created: 22/Jun/17  Updated: 30/Oct/23  Resolved: 26/Jun/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.9
Fix Version/s: 3.5.10

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-07-10
Participants:

 Description   

Almost all sharding catalog unit-tests define a static variable kReplSecondaryOkMetadata with a function initializer referencing ReadPreferenceSetting. The problem is that this initializer function can be called before ReadPreferenceSetting's static variables have been constructed, which causes the tests to crash under Windows DEBUG.



 Comments   
Comment by Githook User [ 26/Jun/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-29804 Remove 'undefined behaviour' in the sharding catalog unit-tests
Branch: master
https://github.com/mongodb/mongo/commit/95dae0d467d6798b015a5328073a5e3c9e75cdc8

Generated at Thu Feb 08 04:21:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.