Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at trcfile.c:1038

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 22163.29172
Procedure: trc_store_trace_event
Trace: view
Modified: Thu Nov 26 11:35:35 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/tracer/trcfile.c
   Enter trc_store_trace_event
true964 trc_store_trace_event( ID, TD, tid, omit ) 
 965 TRC_ID ID;
 966 TRC_TEVDESC TD;
 967 int tid;
 968 int omit;
 969 {
 970         TRC_DATADESC DD;
 971  
 972         TRC_TEVTASK TT;
 973  
 974         char    upk_byte[TRC_MAX_UNPACK_ARR_SIZE];
   ...
 989         int maxlen;
 990         int ignore;
 991         int tusec;
 992         int tsec;
 993         int len;
 994         int num;
 995         int i;
 996  
 997         /* Dump Descriptor (if necessary) */ 
 998  
 999         if ( !omit && TD->dump )
 1000                 trc_dump_tevdesc( ID, TD, tid );
 1001  
 1002         /* Set New Task Flag */ 
 1003  
 1004         TT = (TRC_TEVTASK) NULL;
 1005  
 1006         tsec = tusec = -1;
 1007  
 1008         newtask = TRC_FALSE;
 1009         endtask = TRC_FALSE;
 1010  
 1011         if ( !strcmp( TD->name, "newtask" ) 
 1012                 || !strcmp( TD->name, "spntask" ) )
 1013         {
 1014                 newtask = TRC_TRUE;
 1015         }
 1016  
 1017         else if ( !strcmp( TD->name, "endtask" ) )
 1018                 endtask = TRC_TRUE;
 1019  
 1020         ignore = TRC_FALSE;
 1021  
 1022         /* Store Event Header */ 
 1023  
 1024         if ( !omit )
 1025                 trc_store_event_header( ID, TD, tid );
 1026  
 1027         /* Store Remainder of Event */ 
 1028  
 1029         DD = TD->ddesc;
 1030  
 1031         while ( DD != NULL )
 1032         {
 1033                 if ( DD->array == TEV_DATA_ARRAY )
 1034                 {
 1035                         TRC_PVMCKERR( pvm_upkint( &num, 1, 1 ),
 1036                                 "Array Unpack", return( TRC_FALSE ) );
 1037  
num is uninitialized1038                         if ( num > TRC_MAX_UNPACK_ARR_SIZE     /* Uninitialized Variable */
Preconditions
omit != 0
TD->ddesc->array = 128
*TD->name = 115
strlen(*TD) = 7
pvmmytid != -1
pvmrbuf = 0
pvmtoplvl != 0
pvmtrc.trctid != pvmmytid
pvmtrc.trctid >= 1
pvmtrc.trcopt != 1
pvmtrc.trcopt != 2
pvmtrc.trcopt != 3
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
DD' = TD->ddesc
TRC_TMP_CC' = 0
TT' = 0
endtask' = 0
ignore' = 0
newline' = 0
newtask' = 1
pvmtrccodef' = &pvmtrccodef_nop.enc_byte
tsec' = -1
tusec' = -1




Change Warning 22163.29172 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: