Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-06-03 Thread Jakub Jelinek
On Wed, Jun 03, 2015 at 06:59:55PM +0200, Marek Polacek wrote: > On Wed, Jun 03, 2015 at 06:33:20PM +0200, Jakub Jelinek wrote: > > Ok, thanks. > > Forgot to ask - can I also backport the fix to gcc-5 branch? Sure. Jakub

Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-06-03 Thread Marek Polacek
On Wed, Jun 03, 2015 at 06:33:20PM +0200, Jakub Jelinek wrote: > Ok, thanks. Forgot to ask - can I also backport the fix to gcc-5 branch? Marek

Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-06-03 Thread Jakub Jelinek
On Wed, Jun 03, 2015 at 06:32:01PM +0200, Marek Polacek wrote: > All right, that seems to work well. Done in the below. > > Bootstrap-ubsaned/regtested on x86_64-linux, ok for trunk? Ok, thanks. > 2015-06-03 Marek Polacek > > PR sanitizer/66190 > * cp-gimplify.c (struct cp_gener

Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-06-03 Thread Marek Polacek
On Fri, May 29, 2015 at 12:26:39PM +0200, Jakub Jelinek wrote: > This seems strange. Normally DECL_INITIAL of vars isn't walked when > processing DECL_EXPRs, so IMHO you shouldn't either. > I think it would be much better to handle this case where the tree.c > code handles it, thus in cp_genericiz

Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-05-29 Thread Jakub Jelinek
On Fri, May 29, 2015 at 10:41:34AM +0200, Marek Polacek wrote: > Ping. > > On Thu, May 21, 2015 at 09:36:59PM +0200, Marek Polacek wrote: > > In this PR, we find ourselves instrumenting a static initializer and > > then crashing when expanding an unlowered UBSAN_NULL. Jakub suggests > > to not in

Re: [PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-05-29 Thread Marek Polacek
Ping. On Thu, May 21, 2015 at 09:36:59PM +0200, Marek Polacek wrote: > In this PR, we find ourselves instrumenting a static initializer and > then crashing when expanding an unlowered UBSAN_NULL. Jakub suggests > to not instrument DECL_INITIAL of a static variable. The following > patch is an at

[PATCH] Don't instrument DECL_INITIAL of statics (PR sanitizer/66190)

2015-05-21 Thread Marek Polacek
In this PR, we find ourselves instrumenting a static initializer and then crashing when expanding an unlowered UBSAN_NULL. Jakub suggests to not instrument DECL_INITIAL of a static variable. The following patch is an attempt to do that. Note that we're still able to sanitize similar cases (they