This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] 2019-09-20 Kamil Rytarowski <n54 at gmx dot com>
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kamil Rytarowski <n54 at gmx dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dvyukov at google dot com, kcc at google dot com, vitalybuka at google dot com
- Date: Sat, 21 Sep 2019 16:53:05 +0200
- Subject: Re: [PATCH] 2019-09-20 Kamil Rytarowski <n54 at gmx dot com>
- References: <20190920204541.610-1-n54@gmx.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Sep 20, 2019 at 10:45:42PM +0200, Kamil Rytarowski wrote:
> GCC version of https://reviews.llvm.org/D67719
>
> From 422827582d84e078df2a8e303d807c830a155ab5 Mon Sep 17 00:00:00 2001
> From: Kamil Rytarowski <n54@gmx.com>
> Date: Fri, 20 Sep 2019 22:02:09 +0200
> Subject: [PATCH] 2019-09-20 Kamil Rytarowski <n54@gmx.com>
>
> * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add new
> builtin __SANITIZE_LEAK__ macros for fsanitize=leak switch.
> * doc/cpp.texi: Document new macros.
>
> * c-c++-common/lsan/sanitize-leak-macro.c: New test.
And this looks even more pointless. -fsanitize=leak generally isn't a
compiler option, just a linker option, but a patch like this would make it a
compiler option too. There are no code changes with -fsanitize=leak, just
linking arranges a malloc etc. replacement that traces the leaks.
Jakub