Re: [pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-09 Thread David Malcolm
On Mon, 2023-10-09 at 17:01 +0200, Tobias Burnus wrote: > Hi David, > > On 09.10.23 16:08, David Malcolm wrote: > > On Mon, 2023-10-09 at 12:09 +0200, Tobias Burnus wrote: > > > The following works: > > > (A) Using "kind == boundaries::kind::HARD" - i.e. adding > > > "boundaries::" > > > (B) Renam

Re: [pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-09 Thread Tobias Burnus
Hi David, On 09.10.23 16:08, David Malcolm wrote: On Mon, 2023-10-09 at 12:09 +0200, Tobias Burnus wrote: The following works: (A) Using "kind == boundaries::kind::HARD" - i.e. adding "boundaries::" (B) Renaming the parameter name "kind" to something else - like "k" as used in the other f

Re: [pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-09 Thread David Malcolm
On Mon, 2023-10-09 at 12:09 +0200, Tobias Burnus wrote: > Hi David, > > your commit breaks compilation with GCC < 6, here with GCC 5.2: > > gcc/analyzer/access-diagram.cc: In member function 'void > ana::boundaries::add(const ana::access_range&, > ana::boundaries::kind)': > gcc/analyzer/access-di

Re: [pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-09 Thread Tobias Burnus
Hi David, your commit breaks compilation with GCC < 6, here with GCC 5.2: gcc/analyzer/access-diagram.cc: In member function 'void ana::boundaries::add(const ana::access_range&, ana::boundaries::kind)': gcc/analyzer/access-diagram.cc:655:20: error: 'kind' is not a class, namespace, or enumerat

[pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-08 Thread David Malcolm
Update out-of-bounds diagrams to show existing string values, and the initial write index within a string buffer. For example, given the out-of-bounds write in strcat in: void test (void) { char buf[10]; strcpy (buf, "hello"); strcat (buf, " world!"); } the diagram improves from: