This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Oct 2013 23:48:24 +0400
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Authentication-results: sourceware.org; auth=none
- References: <20131021114918 dot GB37888 at msticlxl57 dot ims dot intel dot com> <526A01DC dot 4080000 at redhat dot com> <CAMbmDYZLOiBp=h8up2u1S+-DOv1KY9KsG1UwMnyPrOKcyYgc0Q at mail dot gmail dot com> <526ED55F dot 7030305 at redhat dot com> <CAFiYyc2Wu83Om7GpZqqAOTcUcjXfa64wWbSsRAk38uD_p4OkAA at mail dot gmail dot com> <526FB131 dot 6010903 at redhat dot com> <20131029135247 dot GA40485 at msticlxl57 dot ims dot intel dot com> <527005CC dot 9030702 at redhat dot com>
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.
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.
>
>
>
> 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
- References:
- [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins
- Re: [PATCH, MPX, 2/X] Pointers Checker [2/25] Builtins