[SERVER-20819] Coverity analysis defect 76290: Unchecked return value Created: 08/Oct/15  Updated: 19/Jul/16  Resolved: 13/Jul/16

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.3.10

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Waley Chen
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
Sprint: Platforms 17 (07/15/16)
Participants:

 Description   

Value returned from a function is not checked for errors before being used

Defect 76290 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/util/net/message_server_port.cpp
Function mongo::PortMessageServer::accepted(std::shared_ptr<mongo::Socket>, long long)
/src/mongo/util/net/message_server_port.cpp, line: 140
Calling "pthread_attr_setstacksize" without checking return value (as is done elsewhere 1 out of 2 times).

                    pthread_attr_setstacksize(&attrs, stackSizeToSet);



 Comments   
Comment by Githook User [ 13/Jul/16 ]

Author:

{u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}

Message: SERVER-20819 Coverity analysis defect 76290: Unchecked return value
Branch: master
https://github.com/mongodb/mongo/commit/e062cda6f39de5ed3019a764aa127b29e67a1f48

Comment by Eric Milkie [ 08/Oct/15 ]

This might fail if the requested stack size isn't a multiple of the system page size. It would be nice to know when this happens.

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