Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2703.2756
Procedure: tm_pstat
Trace: View
Modified: Wed Sep 2 12:44:03 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_pstat
 912 tm_pstat(tp, mp) 
 913         struct task *tp;
 914         struct pmsg *mp;
 915 {
 916         int tid;
 917         struct hostd *hp;
 918         struct waitc *wp;
 919  
 920         /* unpack and sanity check tid */ 
 921  
 922         if (upkuint(mp, &tid)) {
 923                 pvmlogerror("tm_pstat() bad msg format\n");
 924                 return 0;
 925         }
 926         if (!TIDISTASK(tid)) {
 927                 pvmlogprintf("tm_pstat() bad tid %x\n", tid);
 928                 return 0;
 929         }
 930  
 931         /* nack if no such host */ 
 932  
 933         if (!(hp = tidtohost(hosts, tid))) {
 934                 mp = replymessage(mp);
 935                 pkint(mp, PvmNoTask);
 936                 sendmessage(mp);
 937                 return 0;
 938         }
 939  
 940         /* else make a wait context and send query */ 
 941  
 942         wp = wait_new(WT_PSTAT);
 943         wp->wa_tid = tp->t_tid;
 944         wp->wa_on = hp->hd_hostpart;
 945         wp->wa_mesg = replymessage(mp);
 946  
true947         mp = mesg_new(0);
mp <= 4095948         mp->m_dst = hp->hd_hostpart | TIDPVMD;     /* Null Pointer Dereference */
Preconditions
hosts->ht_last >= 1
numpmsgs = 0
Postconditions
waitlist->wa_link->wa_rlink' = &$heap_159973
waitlist->wa_link->wa_rlink->wa_link' = &$heap_159973
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
$heap_159973' = waitlist->wa_link
bytes_after(&$heap_159973)' = 80
$heap_159973' is allocated by malloc
$heap_159973' is allocated
bytes_before(&$heap_159973)' = 0
((char*)&$heap_159973)[20]' = 7
((char*)&$heap_159973)[28]' = ((char*)$param_1)[32]
((char*)&$heap_159973)[32]' = 0
((char*)&$heap_159973)[56]' = 0
((char*)&$heap_159973)[64]' = 0
((char*)&$heap_159973)[72]' = 0
((char*)&$heap_159973)[8]' = waitlist->wa_link->wa_rlink
hp' = &$unknown_963168
mp' = 0
tp' = $param_1
wp' = &$heap_159973




Change Warning 2703.2756 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: