Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-24 Thread Hal Finkel via cfe-commits
-commits" > <cfe-commits@lists.llvm.org> > Sent: Monday, September 19, 2016 11:21:33 PM > Subject: Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks. > > > WFM; I'll put together a patch that only allows this under > -fno-strict-aliasing. >

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-20 Thread George Burgess IV via cfe-commits
Noted; thanks for the correction. :) On Tue, Sep 20, 2016 at 3:04 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Sep 19, 2016 at 09:21:33PM -0700, George Burgess IV wrote: > > I'm entirely unfamiliar with struct-path-tbaa, so Hal, do you see a > reason > >

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-20 Thread Joerg Sonnenberger via cfe-commits
On Mon, Sep 19, 2016 at 09:21:33PM -0700, George Burgess IV wrote: > I'm entirely unfamiliar with struct-path-tbaa, so Hal, do you see a reason > why struct-path-tbaa wouldn't play nicely with flexible arrays at the end > of types? Glancing at it, I don't think it should cause problems, but a >

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-19 Thread George Burgess IV via cfe-commits
WFM; I'll put together a patch that only allows this under -fno-strict-aliasing. I'm entirely unfamiliar with struct-path-tbaa, so Hal, do you see a reason why struct-path-tbaa wouldn't play nicely with flexible arrays at the end of types? Glancing at it, I don't think it should cause problems,

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread Joerg Sonnenberger via cfe-commits
On Tue, Sep 13, 2016 at 12:51:52PM -0700, Richard Smith wrote: > On Tue, Sep 13, 2016 at 10:44 AM, Joerg Sonnenberger via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > IMO this should be restricted to code that explicitly disables C/C++ > > aliasing rules. > > > Do you mean

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread George Burgess IV via cfe-commits
Yeah, this patch didn't give me the warm fuzzies, either. AFAICT, our only other options are having some sort of struct whitelist (either hard-coded, or given as a flag), or telling people to turn _FORTIFY_SOURCE down if they have code that looks like this. Given that this is apparently common in

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread Richard Smith via cfe-commits
On Tue, Sep 13, 2016 at 10:44 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Sep 12, 2016 at 11:50:36PM -, George Burgess IV via > cfe-commits wrote: > > Author: gbiv > > Date: Mon Sep 12 18:50:35 2016 > > New Revision: 281277 > > > > URL:

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread Joerg Sonnenberger via cfe-commits
On Mon, Sep 12, 2016 at 11:50:36PM -, George Burgess IV via cfe-commits wrote: > Author: gbiv > Date: Mon Sep 12 18:50:35 2016 > New Revision: 281277 > > URL: http://llvm.org/viewvc/llvm-project?rev=281277=rev > Log: > [Sema] Fix PR30346: relax __builtin_object_size checks. > > This patch

r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-12 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Sep 12 18:50:35 2016 New Revision: 281277 URL: http://llvm.org/viewvc/llvm-project?rev=281277=rev Log: [Sema] Fix PR30346: relax __builtin_object_size checks. This patch makes us act more conservatively when trying to determine the objectsize for an array at the end of an