[committed] [PATCH 4/6] detect unterminated const arrays in sprintf calls (PR 86552)

2018-10-03 Thread Jeff Law
This is primarily Martin's work, tweaked to work with the updated c_strlen API from a few weeks ago. The API passes in a c_strlen_data structure pointer rather than a tree pointer. Information about the string is bubbled back to the caller via that structure. That's trivial. More importantly c

Re: [PATCH 4/6] detect unterminated const arrays in sprintf calls (PR 86552)

2018-08-30 Thread Jeff Law
On 08/13/2018 03:28 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by the sprintf family of functions due to unterminated arguments to > %s directives. > > gcc-86552-4.diff > > > PR tree-optimization/86552 - missing warning for reading past the end

[PATCH 4/6] detect unterminated const arrays in sprintf calls (PR 86552)

2018-08-13 Thread Martin Sebor
The attached changes implement the detection of past-the-end reads by the sprintf family of functions due to unterminated arguments to %s directives. PR tree-optimization/86552 - missing warning for reading past the end of non-string arrays gcc/ChangeLog: * gimple-ssa-sprintf.c (struct fmtresul