[cfe-dev] OT: UBsan and Asan makefile targets

Kostya Serebryany kcc at google.com
Thu Jul 16 14:01:10 PDT 2015


Hi Jeffrey,

I'm glad to hear that.
<ad>
If you liked the sanitizers, you may also like libFuzzer (
llvm.org/docs/LibFuzzer.html).
Also, did you try msan?
</ad>

--kcc

On Wed, Jul 15, 2015 at 9:58 PM, Jeffrey Walton <noloader at gmail.com> wrote:

> Hi Everyone,
>
> Great work on the sanitizers. I can't express how useful they are.
>
> The Crypto++ project just promoted them to first class makefile
> targets for internal testing.
>
> For other who want to do the same, one can perform similar to the
> following if using GNU Make (sorry, the Posix Make folks are out of
> luck):
>
>   # Undefined Behavior Sanitzier (Clang and G++)
>   ifeq ($(findstring ubsan,$(MAKECMDGOALS)),ubsan)
>   CXXFLAGS += -fsanitize=undefined
>   endif # UBsan
>
>   # Address Sanitzier (Clang and G++)
>   ifeq ($(findstring asan,$(MAKECMDGOALS)),asan)
>   CXXFLAGS += -fsanitize=address
>   endif # Asan
>
> Then, we provide a recipe for them:
>
>   asan ubsan: libcryptopp.a cryptest.exe
>
> Jeff
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150716/8031521a/attachment.html>


More information about the cfe-dev mailing list