Looks good to me.

2011/11/17 Gang Yu <yugang...@gmail.com>:
> Hi,
>
>    Could a gatekeeper please help review the  fix for bug906?
>
>  http://bugs.open64.net/show_bug.cgi?id=906
>
> Sympton:
>
>    This bug occurs at different phases of wopt, both c-smith [bug906] and
> kernel build [bug907, bug913] report this bug,
>
> ### Assertion failure at line 653 of
> /fc/proj/ctires/open64/o64guru/src/Wed/trunk/osprey/common/com/symtab_defs.h:
> ### Compiler Error in file test.c during Global Optimization -- Create
> CODEMAP
> Representation phase: ### non-KIND_POINTER type doesn't point opencc
> INTERNAL
> ERROR:
> /fc/proj/ctires/open64/o64guru/OPEN64_X86_DBG/Wed/bits/lib/gcc-lib/x86_64-open64-linux/5.0/be
> returned non-zero status 1
> Analyse:
>
>    This is a regression introduced by the volatile patch, the following
> statement is unsafe:
>
> wn_simp_code.h
>
>  955          lod_addr_volatile =
> TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t1)))
>  956              || TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t2)));
> when accessing the SIMPNODE_load_addt_ty, we could not grant the result
> to be the pointer type arbitary,
>  651      {
>  652        Is_True(kind == KIND_POINTER,
>  653                ("non-KIND_POINTER type doesn't point"));
>
> Solution:
>
> add safe-guard for this statement.
>
> --- a/osprey/common/com/wn_simp_code.h
> +++ b/osprey/common/com/wn_simp_code.h
> @@ -952,8 +952,12 @@ INT32 SIMPNODE_Simp_Compare_Trees(simpnode t1, simpnode
> t2)
>            ty_is_volatile = TY_is_volatile(SIMPNODE_ty(t1))
>                || TY_is_volatile(SIMPNODE_ty(t2));
> -          lod_addr_volatile =
> TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t1)))
> -              || TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t2)));
> +          /* open64.net bug906, guarded type check before TY_pointed */
> +          lod_addr_volatile =
> +            (TY_kind(SIMPNODE_load_addr_ty(t1)) == KIND_POINTER
> +             && TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t1)))) ||
> +            (TY_kind(SIMPNODE_load_addr_ty(t2)) == KIND_POINTER
> +             && TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t2)))) ;
> after the patch, bug906,bug907 pass. merged with asm constraints, bug913
> passes.
>
> Regards
> Gang
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>



-- 
Regards,
Lai Jian-Xin

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to