Re: [PATCH] ubsan: remove overflow checks

2021-02-10 Thread Andrey Rybainin
On 2/10/21 3:19 AM, Kees Cook wrote: > On Wed, Feb 10, 2021 at 02:23:48AM +0300, Andrey Ryabinin wrote: >> Since GCC 8.0 -fsanitize=signed-integer-overflow doesn't work with -fwrapv. >> -fwrapv makes signed overflows defines and GCC essentially disables >> ubsan checks. On GCC < 8.0 -fwrapv

Re: [PATCH] ubsan: remove overflow checks

2021-02-09 Thread Peter Zijlstra
On Tue, Feb 09, 2021 at 04:19:03PM -0800, Kees Cook wrote: > On Wed, Feb 10, 2021 at 02:23:48AM +0300, Andrey Ryabinin wrote: > > Since GCC 8.0 -fsanitize=signed-integer-overflow doesn't work with -fwrapv. > > -fwrapv makes signed overflows defines and GCC essentially disables > > ubsan checks. On

Re: [PATCH] ubsan: remove overflow checks

2021-02-09 Thread Kees Cook
On Wed, Feb 10, 2021 at 02:23:48AM +0300, Andrey Ryabinin wrote: > Since GCC 8.0 -fsanitize=signed-integer-overflow doesn't work with -fwrapv. > -fwrapv makes signed overflows defines and GCC essentially disables > ubsan checks. On GCC < 8.0 -fwrapv doesn't have influence on >

[PATCH] ubsan: remove overflow checks

2021-02-09 Thread Andrey Ryabinin
Since GCC 8.0 -fsanitize=signed-integer-overflow doesn't work with -fwrapv. -fwrapv makes signed overflows defines and GCC essentially disables ubsan checks. On GCC < 8.0 -fwrapv doesn't have influence on -fsanitize=signed-integer-overflow setting, so it kinda works but generates false-positves