Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-28 Thread Jan Hubicka
> >>> 2015-04-14 Ilya Enkovich > >>> > >>> PR target/65527 > >>> * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Add > >>> redirection for instrumented calls. > >>> * lto-wrapper.c (merge_and_complain): Merge > >>> -fcheck-pointer-bounds. > >>> (a

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-26 Thread Ilya Enkovich
Ping 2015-05-19 12:39 GMT+03:00 Ilya Enkovich : > Ping > > 2015-05-05 11:05 GMT+03:00 Ilya Enkovich : >> Ping >> >> 2015-04-14 17:35 GMT+03:00 Ilya Enkovich : >>> On 10 Apr 03:27, Jan Hubicka wrote: > > + /* We might propagate instrumented function pointer into > + not instrume

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-19 Thread Ilya Enkovich
Ping 2015-05-05 11:05 GMT+03:00 Ilya Enkovich : > Ping > > 2015-04-14 17:35 GMT+03:00 Ilya Enkovich : >> On 10 Apr 03:27, Jan Hubicka wrote: >>> > >>> > + /* We might propagate instrumented function pointer into >>> > + not instrumented function and vice versa. In such a >>> > + case we

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-05 Thread Ilya Enkovich
Ping 2015-04-14 17:35 GMT+03:00 Ilya Enkovich : > On 10 Apr 03:27, Jan Hubicka wrote: >> > >> > + /* We might propagate instrumented function pointer into >> > + not instrumented function and vice versa. In such a >> > + case we need to either fix function declaration or >> > + remov

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-04-14 Thread Ilya Enkovich
On 10 Apr 03:27, Jan Hubicka wrote: > > > > + /* We might propagate instrumented function pointer into > > + not instrumented function and vice versa. In such a > > + case we need to either fix function declaration or > > + remove bounds from call statement. */ > > + if (flag_chec

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-04-02 Thread Ilya Enkovich
On 24 Mar 15:06, Jakub Jelinek wrote: > On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: > > 2015-03-24 11:33 GMT+03:00 Jakub Jelinek : > > > On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: > > >> + /* We might propagate instrumented function pointer into > > >> +

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Ilya Enkovich
2015-03-25 13:15 GMT+03:00 Richard Biener : > On Wed, Mar 25, 2015 at 10:50 AM, Jakub Jelinek wrote: >> On Wed, Mar 25, 2015 at 10:38:56AM +0100, Richard Biener wrote: >>> --- gcc/passes.c(revision 221633) >>> +++ gcc/passes.c(working copy) >>> @@ -156,7 +156,8 @@ void >>> pass_ma

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Richard Biener
On Wed, Mar 25, 2015 at 11:11 AM, Jakub Jelinek wrote: > On Wed, Mar 25, 2015 at 01:06:46PM +0300, Ilya Enkovich wrote: >> > There is still the wasteful pass_fixup_cfg at the start of: >> > PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes) >> > NEXT_PASS (pass_fixup_cfg); >> > which was

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Richard Biener
On Wed, Mar 25, 2015 at 10:50 AM, Jakub Jelinek wrote: > On Wed, Mar 25, 2015 at 10:38:56AM +0100, Richard Biener wrote: >> --- gcc/passes.c(revision 221633) >> +++ gcc/passes.c(working copy) >> @@ -156,7 +156,8 @@ void >> pass_manager::execute_early_local_passes () >> { >>ex

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Jakub Jelinek
On Wed, Mar 25, 2015 at 01:06:46PM +0300, Ilya Enkovich wrote: > > There is still the wasteful pass_fixup_cfg at the start of: > > PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes) > > NEXT_PASS (pass_fixup_cfg); > > which wasn't there before chkp. Perhaps this should be a different > >

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Ilya Enkovich
2015-03-25 12:50 GMT+03:00 Jakub Jelinek : > On Wed, Mar 25, 2015 at 10:38:56AM +0100, Richard Biener wrote: >> --- gcc/passes.c(revision 221633) >> +++ gcc/passes.c(working copy) >> @@ -156,7 +156,8 @@ void >> pass_manager::execute_early_local_passes () >> { >>execute_pass_li

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Jakub Jelinek
On Wed, Mar 25, 2015 at 10:38:56AM +0100, Richard Biener wrote: > --- gcc/passes.c(revision 221633) > +++ gcc/passes.c(working copy) > @@ -156,7 +156,8 @@ void > pass_manager::execute_early_local_passes () > { >execute_pass_list (cfun, pass_build_ssa_passes_1->sub); > - execu

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Richard Biener
On Wed, Mar 25, 2015 at 9:50 AM, Ilya Enkovich wrote: > 2015-03-24 17:40 GMT+03:00 Richard Biener : >> On Tue, Mar 24, 2015 at 3:06 PM, Jakub Jelinek wrote: >>> On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: >>> >>> The question is what you want to do in the LTO case for the diffe

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Ilya Enkovich
2015-03-25 11:16 GMT+03:00 Jakub Jelinek : > On Wed, Mar 25, 2015 at 11:05:17AM +0300, Ilya Enkovich wrote: >> > The question is what you want to do in the LTO case for the different >> > cases, >> > in particular a TU compiled with -fcheck-pointer-bounds and LTO link >> > without >> > that, or T

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Ilya Enkovich
2015-03-24 17:40 GMT+03:00 Richard Biener : > On Tue, Mar 24, 2015 at 3:06 PM, Jakub Jelinek wrote: >> On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: >> >> The question is what you want to do in the LTO case for the different cases, >> in particular a TU compiled with -fcheck-point

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Jakub Jelinek
On Wed, Mar 25, 2015 at 11:05:17AM +0300, Ilya Enkovich wrote: > > The question is what you want to do in the LTO case for the different cases, > > in particular a TU compiled with -fcheck-pointer-bounds and LTO link without > > that, or TU compiled without -fcheck-pointer-bounds and LTO link with

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-25 Thread Ilya Enkovich
2015-03-24 17:06 GMT+03:00 Jakub Jelinek : > On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: >> 2015-03-24 11:33 GMT+03:00 Jakub Jelinek : >> > On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: >> >> + /* We might propagate instrumented function pointer into >> >> +

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-24 Thread Richard Biener
On Tue, Mar 24, 2015 at 3:06 PM, Jakub Jelinek wrote: > On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: >> 2015-03-24 11:33 GMT+03:00 Jakub Jelinek : >> > On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: >> >> + /* We might propagate instrumented function pointer into

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-24 Thread Jakub Jelinek
On Tue, Mar 24, 2015 at 12:22:27PM +0300, Ilya Enkovich wrote: > 2015-03-24 11:33 GMT+03:00 Jakub Jelinek : > > On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: > >> + /* We might propagate instrumented function pointer into > >> + not instrumented function and vice versa. In su

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-24 Thread Ilya Enkovich
2015-03-24 11:33 GMT+03:00 Jakub Jelinek : > On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: >> + /* We might propagate instrumented function pointer into >> + not instrumented function and vice versa. In such a >> + case we need to either fix function declaration or >> +

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-24 Thread Jakub Jelinek
On Thu, Mar 19, 2015 at 11:29:44AM +0300, Ilya Enkovich wrote: > + /* We might propagate instrumented function pointer into > + not instrumented function and vice versa. In such a > + case we need to either fix function declaration or > + remove bounds from call statement. */ > + if

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-03-19 Thread Ilya Enkovich
On 12 Mar 13:09, Ilya Enkovich wrote: > Hi, > > Instrumented function pointer may be propagated into not instrumented > indirect call and vice versa. It requires additional call modifications > (either remove bounds or change callee). Bootstrapped and tested on > x86_64-unknown-linux-gnu. OK