Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at lpvm.c:3843

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2841.2902
Procedure: pvm_precv
Trace: View
Modified: Wed Sep 2 12:49:39 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /u1/paul/SATE/2010/c/pvm/pvm3/src/lpvm.c
   Enter pvm_precv
true3759 pvm_precv(tid, tag, cp, len, dt, rtid, rtag, rlen) 
 3760         int tid;
 3761         int tag;
 3762         void *cp;
 3763         int len;
 3764         int dt;
 3765         int *rtid;
 3766         int *rtag;
 3767         int *rlen;
 3768 {
 3769         int nb, mc, src;
 3770         int rbf;
 3771         int cc = 0;
 3772         long ad;
 3773         TEV_DECLS 
 3774  
 3775         if (TEV_EXCLUSIVE) {
 3776                 if (TEV_DO_TRACE(TEV_PRECV,TEV_EVENT_ENTRY)) {
 3777                         TEV_PACK_INT( TEV_DID_RST, TEV_DATA_SCALAR, &tid, 1, 1 );
 3778                         TEV_PACK_INT( TEV_DID_RMC, TEV_DATA_SCALAR, &tag, 1, 1 );
 3779                         TEV_PACK_INT( TEV_DID_RCX, TEV_DATA_SCALAR,
 3780                                         &pvmmyctx, 1, 1 );
 3781                         ad = (long)cp;
 3782                         TEV_PACK_LONG( TEV_DID_PDA, TEV_DATA_SCALAR, &ad, 1, 1 );
 3783                         TEV_PACK_INT( TEV_DID_PC, TEV_DATA_SCALAR, &len, 1, 1 );
 3784                         TEV_PACK_INT( TEV_DID_PDT, TEV_DATA_SCALAR, &dt, 1, 1 );
 3785                         TEV_FIN;
 3786                 }
 3787         }
 3788  
 3789         switch (dt) {
 3790  
 3791         case PVM_BYTE
 3792                 len *= sizeof(char);
 3793                 break;
 3794  
 3795         case PVM_SHORT: 
 3796         case PVM_USHORT: 
 3797                 len *= sizeof(short);
 3798                 break;
 3799  
 3800         case PVM_INT
 3801         case PVM_UINT
 3802                 len *= sizeof(int);
 3803                 break;
 3804  
 3805         case PVM_LONG
 3806         case PVM_ULONG
 3807                 len *= sizeof(long);
 3808                 break;
   ...
 3825  
 3826         case PVM_STR
 3827                 cc = PvmNotImpl;
 3828                 break;
 3829  
 3830         default
 3831                 cc = PvmBadParam;
 3832                 break;
 3833         }
 3834  
 3835         if (!cc) {
 3836 #if !defined(IMA_MPP)
 3837                 rbf = pvm_setrbuf(0);
 3838                 cc = pvm_recv(tid, tag);
 3839                 if (cc > 0) {
 3840                         pvm_bufinfo(cc, &nb, &mc, &src);
 3841                         if (rlen)
 3842                                 *rlen = nb;   /* Uninitialized Variable (ID: 2842.2903) */
nb is uninitialized3843                         if (nb < len)     /* Uninitialized Variable */
Preconditions
$param_8 = 0
&$unknown_2526572 >= 1
pvmautoerr = 0
pvmmytid = -1
pvmtoplvl != 0
pvmtrc.trctid >= 1
pvmtrc.trcopt = 2
Postconditions
cc' = &$unknown_2526572
cp' = $param_3
dt' = 9
pvm_errno' = -16
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmmidhsiz' >= 2
pvmmidhsiz' >= &$unknown_2526572 + 1
pvmtoplvl' = 0
pvmtrcsavekind' = 84
rbf' = -16
rlen' = $param_8
rtag' = $param_7
rtid' = $param_6




Change Warning 2841.2902 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: