Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-20 Thread Dávid Bolvanský
Yeah, gcc is doing weird things here : ( It is kinda sad that same flag does different things with gcc and clang. > Dňa 20. 8. 2020 o 19:56 užívateľ Arvind Sankar > napísal: > > On Thu, Aug 20, 2020 at 04:56:02PM +0200, Rasmus Villemoes wrote: >>> On 18/08/2020 23.41, Arvind Sankar wrote: >

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Dávid Bolvanský
Here: https://godbolt.org/z/qjo5P6 st 19. 8. 2020 o 0:00 Nick Desaulniers napísal(a): > > On Tue, Aug 18, 2020 at 2:41 PM Arvind Sankar wrote: > > > > On Tue, Aug 18, 2020 at 01:58:51PM -0700, Nick Desaulniers wrote: > > > On Tue, Aug 18, 2020 at 1:27 PM Nick Desaulniers > > > wrote: > > > > >

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-18 Thread Dávid Bolvanský
So -fno-builtin-stpcpy is not ideal solution then.. gcc may implement this opt too and here we go again, red builds. We should either provide stpcpy implementation or fix few places and do not use sprintf there. > Dňa 18. 8. 2020 o 23:41 užívateľ Arvind Sankar > napísal: > > On Tue, Aug 18,

Re: [PATCH v2] lib/string.c: implement stpcpy

2020-08-15 Thread Dávid Bolvanský
Yeah, sprintf calls should be replaced with something safer. > Dňa 15. 8. 2020 o 18:34 užívateľ Kees Cook napísal: > > On Fri, Aug 14, 2020 at 07:09:44PM -0700, Nick Desaulniers wrote: >> LLVM implemented a recent "libcall optimization" that lowers calls to >> `sprintf(dest, "%s", str)` where t

Re: [PATCH v2] lib/string.c: implement stpcpy

2020-08-15 Thread Dávid Bolvanský
-fno-builtin-stpcpy can be used to disable stpcpy but Nick at llvm bugzilla wrote that these flags are broken with LTO. > Dňa 15. 8. 2020 o 23:24 užívateľ Joe Perches napísal: > > On Sat, 2020-08-15 at 13:47 -0700, Nick Desaulniers wrote: >>> On Sat, Aug 15, 2020 at 9:34 AM Kees Cook wrote:

Re: [PATCH] tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro

2019-09-25 Thread Dávid Bolvanský
GCC C frontend does not warn, GCC C++ FE does. https://godbolt.org/z/_sczyM So I (we?) think there is something weird in gcc frontends. >> I can't think of a case that this warning is a bug (maybe David can explain more), In this case or generally? General bug example: if (state == A || B) (sh