Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at pvmgsu_core.c:634

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2940.3023
Procedure: int_query_server
Trace: View
Modified: Wed Sep 2 12:53:23 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/pvmgs/pvmgsu_core.c
   Enter int_query_server
true566 int_query_server(group, request, caller, rvalue, optarg) 
 567 char *group;
 568 int request;
 569 char *caller;
 570 int *rvalue;
 571 int optarg;
 572 {
 573         int len;
 574         int rbuf;
 575         int sbuf,stid;
 576         int state;
 577         int savectx;
 578  
 579         GROUP_STRUCT_PTR sgroup;
 580  
 581         pvm_mytid();
 582  
 583         if (group == (char*)0 || *group == '\0')
 584                 return  (*rvalue = PvmNullGroup);
 585  
 586         if ( (stid = gs_getgstid()) < 0)  /* find the server's tid         */ 
 587                 return  (*rvalue = PvmSysErr);
 588  
 589         /* set context for dynamic groups */ 
 590         savectx = pvm_setcontext( SYSCTX_DG );
 591  
 592         /* send the request to the group server.                           */ 
 593         if ((sbuf = pvm_mkbuf(PvmDataDefault)) < 0)
 594                 pvm_perror(caller);
 595  
 596         if ((sbuf = pvm_setsbuf(sbuf)) < 0)
 597                 pvm_perror(caller);
 598  
 599         if (pvm_pkstr(group) < 0)
 600                 pvm_perror(caller);
 601  
 602         if (request == GETINST 
 603                         || request == GETTID 
 604                         || request == BARRIER 
 605                         ||  request == BARRIERV 
 606                         || request == STATICGROUP)  
 607         {
 608                 /* pack optarg                                                 */ 
 609                 if (pvm_pkint(&optarg, 1, 1 ) < 0)
 610                         pvm_perror(caller);
 611         }
 612          
 613         if (pvm_send(stid, request) < 0)
 614                 pvm_perror(caller);
 615  
 616         if ((rbuf = pvm_setrbuf(0)) < 0) /* get return value from  server  */ 
 617                 pvm_perror(caller);
 618          
 619         if (request == BARRIERV) request = BARRIER;  
 620         {
 621                 if (pvm_trecv(stid, request, pvmgs_tmout) <= 0)
 622                         pvm_perror(caller);
 623         }
 624  
 625         if (pvm_upkint(rvalue, 1, 1) < 0)
 626                 pvm_perror(caller);
 627  
 628         if (request == JOIN || request == LEAVE || request == BARRIER 
 629                         || *rvalue < 0 )
 630                 state = DYNAMIC; /* no state data will be returned            */ 
 631         else 
 632                 pvm_upkint(&state,1,1);
 633  
state is uninitialized634         if (state == STATIC)            /* we've got new static group info */     /* Uninitialized Variable */
Preconditions
$param_2 = 6
$param_3 != 0
((char*)&((char*)$unknown_3426355)[72])[40] = 1
*$param_1 != 0
strlen($param_1) > 0
pvmmytid >= -1
pvmtoplvl != 0
Postconditions
((char*)&((char*)$unknown_3426355)[72])[40]' = ((char*)&((char*)$unknown_3426355)[72])[40] - 1
((char*)$unknown_3426355)[72]' = &freefrags.fr_link
caller' = $param_3
freefrags.fr_rlink' = ((char*)&$unknown_3426355)[72]
group' = $param_1
pvm_errno' = -15
pvmautoerr' = 0
pvmmytid' != -1
pvmrbuf' = 0
pvmtrc.trctid' <= 0
rbuf' = -16
request' = $param_2
rvalue' = $param_4
sbuf' = -2
stid' >= 0
topvmd' = 0




Change Warning 2940.3023 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: