Could a gatekeeper review and approve the attached  patch for bug #727?

Below is a description of the problem and it's fix.

Thanks
Bob Scollard


NOTE: I think (and my testing confirms) that this problem subsumes the second
              problem reported and fixed in bug #585. I think the code that 
fixes
              the problem exhibited by testcase "crash2.C" in bug report 585
             could be removed but, to be on the safe side, I have left code 
that in
             the file.

Fix for 727.

There have been several changes to routine WGEN_Expand_Expr (wgen_expr.cxx)
having to do with gspin trees below GS_INIT_EXPR  nodes (see the comments in
WGEN_Expand_Expr in the GS_MODIFY_EXPR case and the comments for "Bug 11253"
and bug 15210").  These changes (and others) modify the gspin input tree to
make it easier to translate to WHIRL.  This problem occurs in the case where
the gspin tree is:

Original gspin                    Modified to
-------------------------------------------------
GS_INIT_EXPR
  GS_COMPONENT_REF (A)
  GS_TARGET_EXPR
    GS_VAR_DECL             -> GS_COMPONENT_REF (A)
    GS_COND_EXPR
      GS_NE_EXPR
      GS_TARGET_EXPR
        GS_VAR_DECL         -> GS_COMPONENT_REF (A)
        <operand 1>
      GS_TARGET_EXP
        GS_VAR_DECL         -> GS_COMPONENT_REF (A)
         <operand 1>

The problem occurs because, in the context of a GS_COND_EXPR, the GS_TARGET_EXP
operand 1 is not expanded so no symbol table entry is built for the expression
value. This results in the dereference of a NULL symbol table entry pointer.
In the original problem report, operand 1 is a GS_CONSTRUCTOR.  Subsequent
testing revealed that the problem occurs for cases when operand 1 something
other than a GS_CONSTRUCTOR.

This change addresses the problem by expanding operand 1.

Attachment: 727.p
Description: 727.p

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to