Operational Defect Database

BugZero found this defect 2393 days ago.

MongoDB | 414206

[SERVER-30569] Coverity analysis defect 101928: Arguments in wrong order

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.12

Description:

Info

The arguments to a function call are provided in the wrong order. Defect 101928 (STATIC_C) Checker SWAPPED_ARGUMENTS (subcategory none) File: /src/mongo/db/repl/idempotency_update_sequence.cpp Function mongo::UpdateSequenceGenerator::generatePaths(const mongo::UpdateSequenceGeneratorConfig &, const std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &)

Top User Comments

may.hoque commented on Wed, 9 Aug 2017 13:58:14 +0000: Have a wonderful day! xgen-internal-githook commented on Wed, 9 Aug 2017 13:56:20 +0000: Author: {'username': 'Utagai', 'email': 'may.hoque@mongodb.com', 'name': 'may'} Message: SERVER-30569 Fix incorrectly swapped document and array probabilities to constructor. Branch: master https://github.com/mongodb/mongo/commit/041f96f0d1b8a153f76bd86b3d394961fa09b716 max.hirschhorn@10gen.com commented on Tue, 8 Aug 2017 22:48:15 +0000: may.hoque, this appears to be real issue; the change to have the document parameters before the array parameters wasn't carried through all of the necessary places. Coverity flagged the construction of this UpdateSequenceGeneratorConfig instance. CID 101928 (#1 of 1): Arguments in wrong order (SWAPPED_ARGUMENTS) swapped_arguments: The positions of arguments in the constructor for mongo::UpdateSequenceGeneratorConfig do not match the ordering of the parameters: config.arrProbability is passed to docProbability_ config.docProbability is passed to arrProbability_

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...