Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmgs_func.c:838

Categories: LANG.MEM.NPD CWE:476
Warning ID: 557.29352
Procedure: gs_barrier
Trace: view
Modified: Thu Nov 26 11:38:47 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/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: 22197.29366) */
 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;
 825                 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,
true836                         "gs_barrier");  
 837  
group->btids <= 4095838         group->btids[group->barrier_index++] = tid;     /* Null Pointer Dereference */
Preconditions
cnt = -1
*gname != 0
strlen(gname) != 0
((char*)&$unknown_13715668)[16] >= 2
((char*)&$unknown_13715668)[36] <= 0
((char*)&$unknown_13715668)[56] != 3
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
((char*)&$unknown_13715668)[24]' = 0
((char*)&$unknown_13715668)[28]' = 1
((char*)&$unknown_13715668)[32]' = 0
((char*)&$unknown_13715668)[36]' = ((char*)&$unknown_13715668)[36] + 10
errno' != 0
group' = &$unknown_13715668




Change Warning 557.29352 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: