This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support -fsanitize=leak


Jakub Jelinek <jakub@redhat.com> writes:

> This patch adds support for -fsanitize=leak and -static-liblsan options.
> If combined with -fsanitize=address, it does nothing,

>From this hunk:

    @@ -8123,7 +8133,10 @@ sanitize_spec_function (int argc, const
	 return (flag_sanitize & SANITIZE_THREAD) ? "" : NULL;
       if (strcmp (argv[0], "undefined") == 0)
	 return (flag_sanitize & SANITIZE_UNDEFINED) ? "" : NULL;
    -
    +  if (strcmp (argv[0], "leak") == 0)
    +    return ((flag_sanitize
    +	     & (SANITIZE_ADDRESS | SANITIZE_LEAK | SANITIZE_THREAD))
    +	    == SANITIZE_LEAK) ? "" : NULL;
       return NULL;
     }

I'd say if combined with -fsanitize={address,thread} it does nothing,
right?

I'd say this needs some tests as well, but I guess they are coming a
bit later in the cycle?

[...]

> On Fri, Nov 15, 2013 at 12:34:14PM -0800, Ian Lance Taylor wrote:

>> Documentation?
>
> Here it is, as incremental patch:
>
> 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
>
> 	* doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document.

[...]


> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Yes, this is OK with the incremental patch for the documentation.

Thanks.

-- 
		Dodji


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]