Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at tdpro.c:1581

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2712.2765
Procedure: tm_task
Trace: View
Modified: Wed Sep 2 12:44:13 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/src/tdpro.c
   Enter tm_task
 1548 tm_task(tp, mp) 
 1549         struct task *tp;
 1550         struct pmsg *mp;
 1551 {
 1552         int where;
 1553         struct pmsg *mp2;
 1554         struct waitc *wp;
 1555         struct waitc *wp2 = 0;  /* master waitc of peer group */ 
 1556         int hh;
 1557         struct hostd *hp;
 1558  
 1559         if (upkuint(mp, &where)) {
 1560                 pvmlogerror("tm_task() bad msg format\n");
 1561                 return 0;
 1562         }
 1563  
 1564         mp = replymessage(mp);
 1565         mp->m_dst = tp->t_tid;   /* Null Pointer Dereference (ID: 2714.2767) */
 1566         mp->m_tag = TM_TASK;
 1567  
 1568         if (where) {            /* specific host or task requested */ 
 1569                 if (!(hp = tidtohost(hosts, where))) {
 1570                         pkint(mp, PvmNoHost);
 1571                         sendmessage(mp);
 1572                         return 0;
 1573                 }
 1574                 pkint(mp, 0);
 1575                 wp = wait_new(WT_TASK);
 1576                 wp->wa_mesg = mp;
 1577                 wp->wa_tid = tp->t_tid;
 1578                 wp->wa_on = hp->hd_hostpart;
 1579  
true1580                 mp = mesg_new(0);
mp <= 40951581                 mp->m_tag = DM_TASK;     /* Null Pointer Dereference */
Preconditions
&$unknown_1005891 != 0
hosts->ht_last >= 1
numfrags = 0
numpmsgs = 1
Postconditions
freepmsgs.m_link->m_link->m_rlink' = freepmsgs.m_link->m_rlink
waitlist->wa_link->wa_rlink' = &$heap_161261
waitlist->wa_link->wa_rlink->wa_link' = &$heap_161261
freepmsgs.m_link->m_rlink->m_link' = freepmsgs.m_link->m_link
$unknown_1005889' = &freefrags.fr_link
((char*)&$unknown_1005889)[8]' = ((char*)&$unknown_1005890)[8]
freefrags.fr_link' = &$unknown_1005889 - 64
freefrags.fr_rlink' = &$unknown_1005889
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
$heap_161261' = waitlist->wa_link
bytes_after(&$heap_161261)' = 80
$heap_161261' is allocated by malloc
$heap_161261' is allocated
bytes_before(&$heap_161261)' = 0
((char*)&$heap_161261)[20]' = 4
((char*)&$heap_161261)[28]' = ((char*)$param_1)[32]
((char*)&$heap_161261)[32]' = 0
((char*)&$heap_161261)[56]' = freepmsgs.m_link
((char*)&$heap_161261)[64]' = 0
((char*)&$heap_161261)[72]' = 0
((char*)&$heap_161261)[8]' = waitlist->wa_link->wa_rlink
hp' = &$unknown_1005892
mp' = 0
numfrags' = 499
numpmsgs' = numpmsgs - 1
tp' = $param_1
where' = &$unknown_1005891
wp' = &$heap_161261
wp2' = 0




Change Warning 2712.2765 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: