This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins


On Tue, Oct 29, 2013 at 8:48 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> 2013/10/29 Jeff Law <law@redhat.com>:
>> On 10/29/13 07:52, Ilya Enkovich wrote:
>>>
>>>
>>> Yeah.  I'm working on it right now.  I've fixed known issues and now
>>> I'm looking for others.  Meanwhile here is a new patch version with
>>> required renames and without LTO restriction.
>>
>> I can't help but but curious, what turned out to be the root cause of those
>> LTO problems?
>
> There were three different problems fixed.
>
> The first one was SSA_NAME in DECL_INITIAL of local var.
> Instrumentation used it to initialize var with input arg value
> (default SSA_NAME of PARM_DECL was used). LTO cannot handle it because
> when it reads symbols, it does not have SSA_NAMEs. It caused ICE.

Obviously putting things in trees is bad.

> Another problem was in LTO front-end. I did not realize it has own
> langhooks. It caused reset of flag_check_pointer_bounds in
> process_options by my own code.
>
> And the last one was in initialization of checker structures. Some
> structures were initialized during checker pass and then used in other
> passes (e.g. expand). With LTO checker pass is not executed after LTO
> front-end and following passes could work with uninitialized checker
> structures.

Looks badly designed then - any function related information should
be hooked off struct function and streamed by LTO.  Or the info
should be present in the IL.

Richard.

>>
>>
>>
>> 2013-10-29  Ilya Enkovich  <ilya.enkovich@intel.com>
>>
>>         * builtin-types.def (BT_FN_VOID_CONST_PTR): New.
>>         (BT_FN_PTR_CONST_PTR): New.
>>         (BT_FN_CONST_PTR_CONST_PTR): New.
>>         (BT_FN_PTR_CONST_PTR_SIZE): New.
>>         (BT_FN_PTR_CONST_PTR_CONST_PTR): New.
>>         (BT_FN_VOID_PTRPTR_CONST_PTR): New.
>>         (BT_FN_VOID_CONST_PTR_SIZE): New.
>>         (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
>>         * chkp-builtins.def: New.
>>         * builtins.def: include chkp-builtins.def.
>>         (DEF_CHKP_BUILTIN): New.
>>         * builtins.c (expand_builtin): Support
>> BUILT_IN_CHKP_INIT_PTR_BOUNDS,
>>         BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
>>         BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
>>         BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
>>         BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
>>         BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
>>         BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
>>         BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
>>         BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND,
>> BUILT_IN_CHKP_NARROW,
>>         BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
>>         * common.opt (fcheck-pointer-bounds): New.
>>         * toplev.c (process_options): Check Pointer Bounds Checker is
>> supported.
>>         * doc/extend.texi: Document Pointer Bounds Checker built-in
>> functions.
>>
>> This is fine.  Please install.
>
> Thanks!
>
> Ilya
>>
>> Thanks,
>> jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]