Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at lpvmgen.c:1124

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2786.2845
Procedure: pvm_tc_settrace
Trace: View
Modified: Wed Sep 2 12:46:48 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/lpvmgen.c
   Enter pvm_tc_settrace
true1083 pvm_tc_settrace(mid) 
 1084         int mid;
 1085 {
 1086         int trctid;
 1087         int trcctx;
 1088         int trctag;
 1089         int outtid;
 1090         int outctx;
 1091         int outtag;
 1092         char buf[256];
 1093         int tbuf;
 1094         int topt;
 1095  
 1096         pvm_upkint(&trctid, 1, 1);
 1097         pvm_upkint(&trcctx, 1, 1);
 1098         pvm_upkint(&trctag, 1, 1);
 1099         pvm_upkint(&outtid, 1, 1);
 1100         pvm_upkint(&outctx, 1, 1);
 1101         pvm_upkint(&outtag, 1, 1);
 1102         pvm_upkstr(buf);
 1103         pvm_upkint(&tbuf, 1, 1);
 1104         pvm_upkint(&topt, 1, 1);
 1105  
 1106         if (trctid) {
 1107                 /* cheat on trcctx & trctag to avoid race */ 
 1108                 pvmtrc.trcctx = trcctx;
 1109                 pvmtrc.trctag = trctag;
 1110                 pvm_setopt( PvmSelfTraceTid, trctid );
 1111                 if (strlen(buf) + 1 == TEV_MASK_LENGTH)
 1112                         BCOPY(buf, pvmtrc.tmask, TEV_MASK_LENGTH);
 1113                 else {
 1114                         TEV_MASK_INIT(pvmtrc.tmask);
 1115                         pvmlogerror("pvm_tc_settrace() bogus trace mask\n");
 1116                 }
 1117                 BCOPY(pvmtrc.tmask, pvmctrc.tmask, TEV_MASK_LENGTH);
 1118                 if (tbuf >= 0)   /* Uninitialized Variable (ID: 2787.2846) */
 1119                         pvmtrc.trcbuf = tbuf;
 1120                 else {
 1121                         pvmtrc.trcbuf = 0;
 1122                         pvmlogerror("pvm_tc_settrace() bogus trace buffering\n");
 1123                 }
topt is uninitialized1124                 if (topt >= 0)     /* Uninitialized Variable */
Preconditions
&$unknown_1722828 != -1
&$unknown_1722829 != 0
strlen(&buf[0]) != 35
myfmt = -1
pvmautoerr != 0
pvmautoerr != 2
pvmautoerr != 3
pvmmytid = -1
pvmrbuf != 0
pvmtoplvl != 0
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
mid' = $param_1
pvmmytid' = &$unknown_1722828
pvmtrc.trctid' <= 0
pvmtrc.trcbuf' = 0
pvmtrc.tmask[0]' = pvmctrc.tmask[0]
strlen(&pvmtrc.tmask[0])' != 0
pvmtrc.tmask[35]' = 0
tbuf' <= -1
tev_init_mask_i' = -1
trcctx' = pvmtrc.trcctx'
trctag' = pvmtrc.trctag'
trctid' = &$unknown_1722829




Change Warning 2786.2845 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: