1
1
openmpi/opal
Nathan Hjelm 6b86e74218 btl/openib: fix coverity issues
CID 1269933 Uninitialized scalar variable (UNINIT)

This CID isn't really an error but it is best for both valgrind and
coverity cleanness to not write uninitialized data. Added an
initializer for async_command in btl_openib_component_close.

CID 1269930 Uninitialized scalar variable (UNINIT)

Same as above. Best not to write uninitialized data. Added an
initializer for async_command.

CID 1269701 Logically dead code (DEADCODE)

Coverity is correct. The smallest_pp_qp will always be 0. Changed the
initial value so that the smallest_pp_qp is set as intended. If no
per-per queue pair exists then use the last shared queue pair. This
queue pair should have the smallest message size. This will reduce
buffer waste.

CID 1269713 Logically dead code (DEADCODE)

False positive but easy to silence. The two check are meaningless if
HAVE_XRC is 0 so protect them with #if HAVE_XRC.

CID 1269726 Division or modulo by zero (DIVIDE_BY_ZERO)

Indeed an issue. If we get an invalid value for rd_win then this will
cause a divide-by-zero exception. Added a check to ensure rd_win is >
0. Also updated the help message to reflect this requirement.

CID 1269672 Ignoring number of bytes read (CHECKED_RETURN)

This error was somewhat intentional. Linux parameter files are
probably not empty but it is safer to check the return code of read to
make sure we got something. If 0 bytes are read this code could SEGV
whe running strtoull.

CID 1269836 Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)

Add a range check to read_module_param to ensure we do not
overflow. In the future it might be worthwhile to report an error
because these parameters should never cause overflow in this
calculation.

CID 1269692 Calling risky function (DC.WEAK_CRYPTO)

??? This call was added in 2006 but I see no calls to the rest of the
rand48 family of functions. Anyway, we SHOULD NEVER be calling seed48,
srand, etc because it messes with user code. Removed the call to
seed48.

CID 1269823 Dereference null return value (NULL_RETURNS)

This is likely a false positive. The endpoint lock is being held so no
other thread should be able to remove fragments from the list. Also,
mca_btl_openib_endpoint_post_send should not be removing items from
the list. If a NULL fragment is ever returned it will likely be a
coding error on the part of an Open MPI developer. Added an assert()
to catch this and quiet the coverity error.

CID 1269671 Unchecked return value (CHECKED_RETURN)

Added a check for the return code of mca_btl_openib_endpoint_post_send
to quiet the coverity error. It is unlikely this error path will be
traversed.

CID 1270229 Missing break in switch (MISSING_BREAK)

Add a comment to indicate that the fall-through is intentional.

CID 1269735 Dereference after null check (FORWARD_NULL)

There should always be an endpoint when handling a work
completion. The endpoint is either stored on the fragment or can be
looked up using the immediate data. Move the immediate data code up
and add an assert for a NULL endpoint.

CID 1269740 Dereference after null check (FORWARD_NULL)
CID 1269741 Explicit null dereferenced (FORWARD_NULL)

Similar to CID 1269735 fix.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2015-05-28 08:38:09 -06:00
..
asm Per-RFC: remove the --disable-smp-locks configure option 2015-03-04 11:31:43 -07:00
class Consolidate all the QOS changes into one clean commit 2015-05-06 19:48:42 -07:00
datatype opal/ddt: add copy functions for complex types 2015-05-26 16:59:36 +09:00
dss initialize common symbols from opal 2015-05-08 09:48:51 +09:00
etc Backing out the Open SHMEM project 2013-02-12 17:45:27 +00:00
include Merge pull request #379 from hjelmn/remove_enable_smp_locks 2015-04-15 10:02:23 -06:00
mca btl/openib: fix coverity issues 2015-05-28 08:38:09 -06:00
memoryhooks configury: new OPAL_SET_LIB_PREFIX/ORTE_SET_LIB_PREFIX macros 2014-10-22 10:32:19 -07:00
runtime Fix cuda support MCA variables 2015-05-12 09:52:51 -06:00
threads cleanup dead code caused by the removal of the --with-threads configure option 2015-01-16 19:13:59 +09:00
tools wrappers: *_EXTRA_INCLUDES does not exist any more 2015-02-20 08:43:25 -08:00
util opal/keyval: fix coverity issues 2015-05-28 08:38:09 -06:00
win32 windows: effectively revert r32449 2014-08-08 11:36:45 +00:00
Makefile.am Modify destructor function configury 2015-04-20 09:51:06 -06:00
win_makefile George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-) 2014-07-26 00:47:28 +00:00