Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at ddpro.c:1895

Categories: LANG.MEM.NPD CWE:476
Warning ID: 134.28755
Procedure: gotnewhosts
Trace: view
Modified: Thu Nov 26 11:27:44 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/src/ddpro.c
   Enter gotnewhosts
 1873 gotnewhosts(htp2, htp1) 
 1874         struct htab *htp2;              /* new host table */ 
 1875         struct htab *htp1;              /* old host table */ 
 1876 {
 1877         struct pmsg *mp;
 1878         struct htab *htp;
 1879         struct waitc *wp, *wp2;
 1880         int hh;
 1881  
 1882         mp = 0;
 1883         for (wp = waitlist->wa_link; wp != waitlist; wp = wp2) {
 1884                 wp2 = wp->wa_link;
 1885                 if (wp->wa_kind == WT_HOSTA) {
 1886                         if (!mp) {
true1887                                 mp = mesg_new(0);
 1888                                 htp = ht_diff(htp2, htp1);
 1889                                 pkint(mp, htp->ht_cnt);
 1890                                 for (hh = htp->ht_last; hh > 0; hh--)
 1891                                         if (htp->ht_hosts[hh])
 1892                                                 pkint(mp, htp->ht_hosts[hh]->hd_hostpart);
 1893                                 ht_free(htp);
 1894                         }
mp <= 40951895                         mp->m_ref++;     /* Null Pointer Dereference */
 1896                         mp->m_dst = wp->wa_mesg->m_dst;
 1897                         mp->m_ctx = wp->wa_mesg->m_ctx;
 1898                         mp->m_tag = wp->wa_mesg->m_tag;
 1899                         sendmessage(mp);
 1900                         if (wp->wa_count != -1 && --wp->wa_count < 1)
 1901                                 wait_delete(wp);
Preconditions
htp2->ht_last >= 1
((char*)$unknown_453692)[12] = 12
*$unknown_453692 != waitlist
waitlist->wa_link != waitlist
$unknown_453692 != waitlist
((char*)&$heap_64982)[4] >= 2
Postconditions
((char*)$heap_64982)[28]' is freed
$heap_64982' = 0
bytes_after(&$heap_64982)' = 32
$heap_64982' is allocated by malloc
$heap_64982' is freed
bytes_before(&$heap_64982)' = 0
hh' = 0
htp' = &$heap_64982
mp' = 0
wp' = $unknown_453692
wp2' = *$unknown_453692




Change Warning 134.28755 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: