Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-18 Thread Jakub Jelinek
On Thu, Nov 17, 2016 at 05:39:57PM -0800, Marek Polacek wrote: > > Yes, there will be 119 SAVE_EXPRs, and when you -fdump-tree-original it, > > it will be just insanely huge, but each SAVE_EXPR appears exactly twice > > in its containing SAVE_EXPR and the second time cp_genericize_r sees > > the SA

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-17 Thread Marek Polacek
On Thu, Nov 17, 2016 at 09:10:51AM +0100, Jakub Jelinek wrote: > On Wed, Nov 16, 2016 at 04:29:05PM -0800, Marek Polacek wrote: > > Sorry. So consider the following: > > > > class S > > { > > virtual void foo () = 0; > > }; > > > > struct T { > > T &operator << (const char *s); > > }; > > >

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-17 Thread Jakub Jelinek
On Wed, Nov 16, 2016 at 04:29:05PM -0800, Marek Polacek wrote: > Sorry. So consider the following: > > class S > { > virtual void foo () = 0; > }; > > struct T { > T &operator << (const char *s); > }; > > T t; > > void > S::foo () > { > t << "a" << "b" << "c"; > } > > Before > 1498

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-16 Thread Marek Polacek
On Fri, Nov 04, 2016 at 05:16:00PM +0100, Jakub Jelinek wrote: > On Fri, Nov 04, 2016 at 05:05:51PM +0100, Marek Polacek wrote: > > This is a similar case to PR sanitizer/70342. Here, we were generating > > expression > > in a quadratic fashion because of the initializer--we create SAVE_EXPR <>,

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Jason Merrill
On Fri, Nov 4, 2016 at 12:16 PM, Jakub Jelinek wrote: > On Fri, Nov 04, 2016 at 05:05:51PM +0100, Marek Polacek wrote: >> This is a similar case to PR sanitizer/70342. Here, we were generating >> expression >> in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, >> then >>

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 05:05:51PM +0100, Marek Polacek wrote: > This is a similar case to PR sanitizer/70342. Here, we were generating > expression > in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, > then > UBSAN_NULL >, and then COMPOUND_EXPR of these two and so on.

ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Marek Polacek
This is a similar case to PR sanitizer/70342. Here, we were generating expression in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, then UBSAN_NULL >, and then COMPOUND_EXPR of these two and so on. On this testcase we were instrumention CALL_EXPR that is in fact operato