Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmgs_func.c:838

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2956.3039
Procedure: gs_barrier
Trace: View
Modified: Wed Sep 2 12:54:46 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/pvmgs_func.c
   Enter gs_barrier
 786 gs_barrier(gname, msgtag, cnt, tid, hash_list, ngroups) 
 787 char *gname;
 788 int msgtag;
 789 int cnt;
 790 int tid;
 791 GROUP_LIST_PTR hash_list;
 792 int *ngroups;
 793 {
 794         int i, info;
 795         int gstate;
 796         int pcoord;
 797         int nhosts, nmem_onhost;  
 798          
 799         GROUP_STRUCT_PTR group;
 800  
 801         /* check for valid group name */ 
 802         if (gname == (char*) 0 || *gname == '\0')   /* Uninitialized Variable (ID: 2963.3046) */
 803                 return(PvmNullGroup);
 804  
 805         group = gs_group(gname, hash_list, ngroups, NOCREATE);
 806         if (group == (GROUP_STRUCT_PTR) NULL)
 807                 return(PvmNoGroup);
 808          
 809         if (group->staticgroup == STATICDEAD)
 810                 return(PvmNoGroup);
 811  
 812         for (i = 0; i < group->maxntids; i++) /* tid is in group?          */ 
 813                 if (group->tids[i] == tid) break;
 814                         if (i == group->maxntids)  
 815                                 return(PvmNotInGroup);
 816          
 817         /* if it's the whole group the set the count to the # in the group */ 
 818         if (cnt == -1)  
 819                 cnt = group->ntids;
 820          
 821         if (group->barrier_count == -1)  /* is it a new barrier ?       */ 
 822         {
 823                 group->barrier_count = cnt;
 824                 group->barrier_reached = 0;
true825                 group->barrier_index = 0;
 826         }
 827         else 
 828         {
 829                 if (cnt != group->barrier_count)  /* make sure counts match    */ 
 830                         return(PvmMismatch);
 831         }
 832          
 833         /* store the tid */ 
 834         group->btids = gs_realloc_int_array(group->barrier_index + 1,  
 835                         &(group->maxbtids), group->btids, DELTABTIDS, NOTID,
group->barrier_index < 1024836                         "gs_barrier");  
 837  
group->btids <= 4095838         group->btids[group->barrier_index++] = tid;     /* Null Pointer Dereference */
Preconditions
$param_3 = -1
$param_5 >= 1816
((char*)$param_1)[1] = 0
((char*)&((char*)((char*)*$param_5)[2288])[16])[24] >= 1
((char*)&((char*)((char*)*$param_5)[2288])[16])[28] = -1
((char*)&((char*)((char*)*$param_5)[2288])[16])[48] <= 0
((char*)&((char*)((char*)*$param_5)[2288])[16])[48] >= -10
((char*)&((char*)((char*)*$param_5)[2288])[16])[76] != 3
((char*)&((char*)((char*)*$param_5)[2288])[16])[8] >= 2
*$param_1 >= 127
strlen($param_1) = 1
((char*)((char*)((char*)*$param_5)[2288])[16])[16] = $param_4
strlen(((char*)((char*)*$param_5)[2288])[16]) = 1
Postconditions
cnt' = ((char*)&((char*)((char*)*$param_5)[2288])[16])[12]
codesonar_distance_tweak' = 2
gname' = $param_1
group' = ((char*)&((char*)*$param_5)[2288])[16]
hash_list' = $param_5
i' = 0
msgtag' = $param_2
ngroups' = $param_6
tid' = $param_4




Change Warning 2956.3039 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: