Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at job.c:312

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 489.29262
Similar Warnings: 489.29266
Procedure: checkoutput
Trace: view
Modified: Thu Nov 26 11:36:32 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
   /kat0/fletcher/SATE/2010/pvm3/console/job.c
   Enter checkoutput
true252 checkoutput(jp, cc, len, cod, src) 
 253         struct job *jp;
 254         int cc;                                 /* message mid */ 
 255         int len;
 256         int cod;
 257         int src;
 258 {
 259         int tid;                                        /* task */ 
 260         int n;                                          /* length or event code */ 
 261         char *p;
 262         int ptid;
 263         struct obuf *op;
 264         int show;
 265  
 266         show = pvm_getopt( PvmShowTids );
 267  
 268         pvm_upkint(&tid, 1, 1);
 269         pvm_upkint(&n, 1, 1);
 270  
 271         if (n > 0) {   /* Uninitialized Variable (ID: 22175.29267) */
 272                 if (!(op = obuf_find(jp, tid))) {   /* Uninitialized Variable (ID: 489.29266) */
 273                         printf("Bogus message, job %d has no task t%x\n",
 274                                         jp->j_jid - joboffset, tid);
 275                         goto hork;
 276                 }
 277                 if (n + op->o_len >= op->o_maxl) {
 278                         op->o_maxl = op->o_len + n + 1;
 279 /*
 280                         printf("REALLOC t%x buf to %d\n", tid, op->o_maxl);
 281 */ 
   ...
 298                                 fprintf((jp->j_ff ? jp->j_ff : stdout),
 299                                                 "[%d:t%x] ", jp->j_jid - joboffset, tid);
 300                         fprintf((jp->j_ff ? jp->j_ff : stdout),
 301                                         "%s\n", op->o_buf);
 302                         op->o_len -= p - op->o_buf;
 303                         if ( !(op->o_len) ) break;
 304                         BCOPY(p, op->o_buf, op->o_len);
 305                         p = op->o_buf;
 306                 }
 307  
 308         } else {
 309                 switch (n) {
 310  
 311                 case 0: 
tid is uninitialized312                         if (!(op = obuf_find(jp, tid))) {     /* Uninitialized Variable */
Preconditions
&$unknown_12116532 != 0
pvmautoerr = 0
pvmtoplvl != 0
$input_12 <= 97
$input_12 >= 0
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
$heap_437807' = $input_444
bytes_after(&$heap_437807)' = $input_12 + 1
$heap_437807' is allocated by malloc
$heap_437807' is a non-heap object
bytes_before(&$heap_437807)' = 0
strlen(&$heap_437807)' = $input_12
n' = 0
pvm_errno' = -15
pvmmytid' != -1
pvmrbuf' = &$unknown_12116532
pvmtrc.trctid' >= 1
pvmtrccodef' = &$unknown_12116531
td' = &$heap_437807




Change Warning 489.29262 : Uninitialized Variable

Because they are very similar, this warning shares annotations with warning 489.29266.

Priority:
State:
Finding:
Owner:
Note: