Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-12-04 Thread Jeff Law via Gcc-patches
On 11/24/20 11:39 AM, Martin Sebor wrote: > On 11/24/20 10:44 AM, Andrew MacLeod wrote: >> On 11/24/20 12:42 PM, Andrew MacLeod wrote: >>> On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: > On 11/21/20 12:07 AM, Jeff Law wrote: >> >> On

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Martin Sebor via Gcc-patches
On 11/24/20 10:44 AM, Andrew MacLeod wrote: On 11/24/20 12:42 PM, Andrew MacLeod wrote: On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping:

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/24/20 12:42 PM, Andrew MacLeod wrote: On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I don't expect to have the cycles to reimplement

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-23 Thread Martin Sebor via Gcc-patches
On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I don't expect to have the cycles to reimplement this patch using the Ranger APIs before

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-21 Thread Andrew MacLeod via Gcc-patches
On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I don't expect to have the cycles to reimplement this patch using the Ranger APIs before stage 1 closes.  I'm open to giving it a try

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-20 Thread Jeff Law via Gcc-patches
On 11/9/20 9:00 AM, Martin Sebor wrote: > Ping: > https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html > > Jeff, I don't expect to have the cycles to reimplement this patch > using the Ranger APIs before stage 1 closes.  I'm open to giving > it a try in stage 3 if it's still in

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-09 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I don't expect to have the cycles to reimplement this patch using the Ranger APIs before stage 1 closes. I'm open to giving it a try in stage 3 if it's still in scope for GCC 11. Otherwise, is this patch okay to

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-21 Thread Martin Sebor via Gcc-patches
On 9/20/20 12:39 AM, Aldy Hernandez wrote: On 9/19/20 11:22 PM, Martin Sebor wrote: On 9/18/20 12:29 AM, Aldy Hernandez wrote: On 9/17/20 10:18 PM, Martin Sebor wrote: On 9/17/20 12:39 PM, Andrew MacLeod wrote: On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM,

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-20 Thread Aldy Hernandez via Gcc-patches
On 9/19/20 11:22 PM, Martin Sebor wrote: On 9/18/20 12:29 AM, Aldy Hernandez wrote: On 9/17/20 10:18 PM, Martin Sebor wrote: On 9/17/20 12:39 PM, Andrew MacLeod wrote: On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM,

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-19 Thread Martin Sebor via Gcc-patches
On 9/18/20 12:29 AM, Aldy Hernandez wrote: On 9/17/20 10:18 PM, Martin Sebor wrote: On 9/17/20 12:39 PM, Andrew MacLeod wrote: On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM, Martin Sebor wrote: Overflowing the size of a

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-18 Thread Aldy Hernandez via Gcc-patches
On 9/17/20 10:18 PM, Martin Sebor wrote: On 9/17/20 12:39 PM, Andrew MacLeod wrote: On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM, Martin Sebor wrote: Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-17 Thread Martin Sebor via Gcc-patches
On 9/17/20 12:39 PM, Andrew MacLeod wrote: On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM, Martin Sebor wrote: Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can lead to a subsequent buffer overflow

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-17 Thread Andrew MacLeod via Gcc-patches
On 9/17/20 12:08 PM, Martin Sebor via Gcc-patches wrote: On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM, Martin Sebor wrote: Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can lead to a subsequent buffer overflow corrupting the heap or stack.  The attached patch

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-17 Thread Martin Sebor via Gcc-patches
On 9/16/20 9:23 PM, Jeff Law wrote: On 9/15/20 1:47 PM, Martin Sebor wrote: Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can lead to a subsequent buffer overflow corrupting the heap or stack.  The attached patch diagnoses a subset of these cases where the

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-16 Thread Jeff Law via Gcc-patches
On 9/15/20 1:47 PM, Martin Sebor wrote: > Overflowing the size of a dynamic allocation (e.g., malloc or VLA) > can lead to a subsequent buffer overflow corrupting the heap or > stack.  The attached patch diagnoses a subset of these cases where > the overflow/wraparound is still detectable. > >

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-16 Thread Bernhard Reutner-Fischer via Gcc-patches
On 15 September 2020 21:47:46 CEST, Martin Sebor via Gcc-patches wrote: >Overflowing the size of a dynamic allocation (e.g., malloc or VLA) >can lead to a subsequent buffer overflow corrupting the heap or >stack. The attached patch diagnoses a subset of these cases where >the

[PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-15 Thread Martin Sebor via Gcc-patches
Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can lead to a subsequent buffer overflow corrupting the heap or stack. The attached patch diagnoses a subset of these cases where the overflow/wraparound is still detectable. Besides regtesting GCC on x86_64-linux I also