Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2738.2791
Similar Warnings: 2738.2792, 2738.2793
Procedure: change_output
Trace: View
Modified: Wed Sep 2 12:44:43 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 change_output
 2655 change_output(tp, outtid, outctx, outtag) 
 2656         struct task *tp;
 2657         int outtid, outctx, outtag;
 2658 {
 2659         struct pmsg *mp;
 2660  
 2661         if (tp->t_outtid != outtid 
 2662         || tp->t_outctx != outctx 
 2663         || tp->t_outtag != outtag) {
 2664                 if (tp->t_outtid > 0) {
 2665                         mp = mesg_new(0);
 2666                         mp->m_dst = tp->t_outtid;   /* Null Pointer Dereference (ID: 2738.2793) */
 2667                         mp->m_ctx = tp->t_outctx;
 2668                         mp->m_tag = tp->t_outtag;
 2669                         pkint(mp, tp->t_tid);
 2670                         pkint(mp, TO_EOF);
 2671                         sendmessage(mp);
 2672                 }
 2673                 if (pvmdebmask & PDMTASK) {
 2674                         pvmlogprintf("t%x changes output from <t%x %d %d> to <t%x %d %d>\n",
 2675                                         tp->t_tid,
 2676                                         tp->t_outtid, tp->t_outctx, tp->t_outtag,
 2677                                         outtid, outctx, outtag);
 2678                 }
 2679                 tp->t_outtid = outtid;
 2680                 tp->t_outctx = outctx;
 2681                 tp->t_outtag = outtag;
 2682                 if (tp->t_outtid > 0) {
 2683                         mp = mesg_new(0);
 2684                         mp->m_dst = tp->t_outtid;   /* Null Pointer Dereference (ID: 2738.2792) */
 2685                         mp->m_ctx = tp->t_outctx;
 2686                         mp->m_tag = tp->t_outtag;
 2687                         pkint(mp, tp->t_tid);
 2688                         pkint(mp, TO_SPAWN);
 2689                         pkint(mp, tp->t_ptid);
 2690                         sendmessage(mp);
 2691  
true2692                         mp = mesg_new(0);
mp <= 40952693                         mp->m_dst = tp->t_outtid;     /* Null Pointer Dereference */
Preconditions
$param_2 >= 1
&$unknown_1180559 = &$unknown_1180558 + 136
&$unknown_1180559 >= 4232
((char*)$param_1)[144] = $param_2
((char*)$param_1)[144] >= 1
((char*)$param_1)[148] = $param_3
((char*)$param_1)[152] != $param_4
numpmsgs = 0
Postconditions
((char*)$unknown_1180571)[8]' = ((char*)&$unknown_1180571)[8]
((char*)$unknown_1180558)[8]' = &$unknown_1180559
((char*)$unknown_1180571)[8]' = $unknown_1180571
$unknown_1180559' = &freepmsgs.m_link
((char*)&$unknown_1180559)[8]' = ((char*)&$unknown_1180558)[8]
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = 0
numpmsgs' = 0
outctx' = $param_3
outtag' = $param_4
outtid' = $param_2
tp' = $param_1




Change Warning 2738.2791 : Null Pointer Dereference

Because they are very similar, this warning shares annotations with warnings 2738.2792 and 2738.2793.

Priority:
State:
Finding:
Owner:
Note: