Re: git: be04fec42638 - main - Import _FORTIFY_SOURCE implementation from NetBSD
Date: Sun, 19 May 2024 05:09:56 UTC
On Sunday, May 19, 2024 6:39:59 AM GMT+2 Pedro Giffuni wrote: > FWIW .. and let me be clear I haven't worked on this in ages and I am not planning to retake this either... > clang just couldn't do the static fortify_source checks due to the way llvm uses an intermediate representation; the size just couldn't be handled in the preprocessor. That hasn't been true for a long time. __builtin_object_size is only folded in the frontend if it absolutely has to because the context requires an Integer Constant Expression, otherwise it is folded only if the answer is definite. In all other cases it is left for the IR passes to lower. > fortify_source does replace some key libc functions with memory checking alternatives and that turns out to be annoying when debugging. Since the wrapper functions are always_inline, they are pretty much invisible to debuggers. Joerg