This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)


On Fri, Jan 20, 2017 at 04:32:19PM -0700, Jeff Law wrote:
> > then the loop does the same thing as will memset (p, 6, 3U * 1024 * 1024 * 1024);
> > do.  On such large objects some operations may not work properly, e.g.
> > &p[i] - &p[0] might be negative etc., but that is not something the above
> > loop does or memset will do internally.  If the loop doesn't use just 3/4 of
> > the address space, but much more, e.g. more than whole address space minus
> > one page, which is what happens in the testcase, it is indeed quite sure it
> > will crash if invoked, but the problem with the warning is the same with
> > many other late warnings or warnings excessively using VRP etc.
> Not in my mind, it's different.  It's not triggered by path isolation. It's
> standard const propagation + simplification.

So where does the constant -1 length appear there?  The test clearly just
attempts to clear some variable length - 1.  I admit I haven't looked at the
dumps in detail, I should...

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]