[SERVER-20131] Coverity analysis defect 73620: Big parameter passed by value Created: 26/Aug/15  Updated: 25/Jan/17  Resolved: 26/Aug/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.1.8

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

A large function call parameter or exception catch statement is passed by value

Defect 73620 (STATIC_C)
Checker PASS_BY_VALUE (subcategory none)
File: /src/mongo/s/chunk.cpp
Function mongo::Chunk::Chunk(mongo::OperationContext *, const mongo::ChunkManager *, mongo::ChunkType)
/src/mongo/s/chunk.cpp, line: 162
Passing parameter from of type "mongo::ChunkType" (size 136 bytes) by value.

    Chunk::Chunk(OperationContext* txn, const ChunkManager* manager, ChunkType from)



 Comments   
Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-20131 Take ChunkType by reference in Chunk constructor
Branch: master
https://github.com/mongodb/mongo/commit/b81407f19142d0af0b8fda2035eb0cc5860d0758

Generated at Thu Feb 08 03:53:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.