[committed] Make Wstringop-overflow-27 testnames unique [was Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)]

2020-01-08 Thread Jeff Law
On Wed, 2020-01-08 at 12:52 +0100, Andreas Schwab wrote: > On Dez 06 2019, Martin Sebor wrote: > > > diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > > b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > > new file mode 100644 > > index 000..249ce2b6ad5 > > --- /dev/null > > +++ b

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2020-01-08 Thread Jeff Law
On Wed, 2020-01-08 at 12:52 +0100, Andreas Schwab wrote: > On Dez 06 2019, Martin Sebor wrote: > > > diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > > b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > > new file mode 100644 > > index 000..249ce2b6ad5 > > --- /dev/null > > +++ b

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2020-01-08 Thread Andreas Schwab
On Dez 06 2019, Martin Sebor wrote: > diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > new file mode 100644 > index 000..249ce2b6ad5 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c > +void test_strcpy_warn (

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-17 Thread Christophe Lyon
On Sat, 14 Dec 2019 at 22:35, Jeff Law wrote: > > On Fri, 2019-12-13 at 17:55 -0700, Martin Sebor wrote: > > After more testing by Jeff's buildbot and correcting the problems > > it exposed I have committed the attached patch in r279392. > And just to close the loop on this. Your last version fix

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-14 Thread Jeff Law
On Fri, 2019-12-13 at 17:55 -0700, Martin Sebor wrote: > After more testing by Jeff's buildbot and correcting the problems > it exposed I have committed the attached patch in r279392. And just to close the loop on this. Your last version fixed all the issues I saw in the tester. jeff

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-13 Thread Martin Sebor
After more testing by Jeff's buildbot and correcting the problems it exposed I have committed the attached patch in r279392. Martin On 12/11/19 4:23 PM, Martin Sebor wrote: Jeff's buildbot exposed a bug in the patch that caused false positives in cases involving negative offsets into destinatio

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-11 Thread Martin Sebor
Jeff's buildbot exposed a bug in the patch that caused false positives in cases involving negative offsets into destinations involving pointers pointing into multiple regions of the same object. The attached revision fixes that bug, plus makes a few minor other fixes pointed out in PR 92868. On

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-06 Thread Jakub Jelinek
On Fri, Dec 06, 2019 at 05:19:36PM -0700, Martin Sebor wrote: > With part 2 (below) of this work committed, I've rebased the patch > on the top of trunk and on top of the updated part 1 (also below). > Attached is the result, retested on x86_64-linux. > --- a/gcc/tree-ssa-strlen.c > +++ b/gcc/tree

[PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-06 Thread Martin Sebor
With part 2 (below) of this work committed, I've rebased the patch on the top of trunk and on top of the updated part 1 (also below). Attached is the result, retested on x86_64-linux. [1] include size and offset in -Wstringop-overflow https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00392.html

Re: [PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-06 Thread Martin Sebor
On 11/30/19 9:31 AM, Christophe Lyon wrote: On Tue, 12 Nov 2019 at 02:28, Martin Sebor wrote: The attached patch extends the strlen pass to detect out-of-bounds accesses to memory allocated by calls to other allocation functions besides calloc and malloc, as well as VLAs, and user-defined func

Re: [PATCH] track dynamic allocation in strlen (PR 91582)

2019-11-30 Thread Christophe Lyon
On Tue, 12 Nov 2019 at 02:28, Martin Sebor wrote: > > The attached patch extends the strlen pass to detect out-of-bounds > accesses to memory allocated by calls to other allocation functions > besides calloc and malloc, as well as VLAs, and user-defined > functions declared with attribute alloc_si

[PING 2][PATCH] track dynamic allocation in strlen (PR 91582)

2019-11-25 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00812.html On 11/18/19 11:23 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00812.html On 11/11/19 6:27 PM, Martin Sebor wrote: The attached patch extends the strlen pass to detect out-of-bounds accesses to memory

Re: [PATCH] track dynamic allocation in strlen (PR 91582)

2019-11-18 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00812.html On 11/11/19 6:27 PM, Martin Sebor wrote: The attached patch extends the strlen pass to detect out-of-bounds accesses to memory allocated by calls to other allocation functions besides calloc and malloc, as well as VLAs, and user-defi

[PATCH] track dynamic allocation in strlen (PR 91582)

2019-11-11 Thread Martin Sebor
The attached patch extends the strlen pass to detect out-of-bounds accesses to memory allocated by calls to other allocation functions besides calloc and malloc, as well as VLAs, and user-defined functions declared with attribute alloc_size. There is some overlap with the _FORTIFY_SOURCE detectio