Re: Connected sanitizer libraries to the build (for x86)

From: Chris H <bsd-lists_at_bsdforge.com>
Date: Tue, 13 Jan 2015 14:23:50 -0800
On Tue, 13 Jan 2015 21:28:08 +0100 Dimitry Andric <dim_at_FreeBSD.org> wrote

> Hi,
> 
> In r277146, I have connected the sanitizer libraries from compiler-rt to
> the build.  Currently, this works for i386 and amd64, and contains
> Address Sanitizer (ASan) and Undefined Behavior Sanitizer.
> 
> AddressSanitizer is a fast memory error detector [1].  It consists of a
> compiler instrumentation module and a run-time library. The tool can
> detect the following types of bugs:
> 
> * Out-of-bounds accesses to heap, stack and globals
> * Use-after-free
> * Use-after-return (to some extent)
> * Double-free, invalid free
> * Memory leaks (experimental)
> 
> The typical slowdown introduced by AddressSanitizer is 2x.  Enable it by
> compiling and linking with clang, and using the -fsanitize=address flag.
> 
> Undefined Behavior Sanitizer is a fast and compatible undefined behavior
> checker, which enables a number of checks that have small runtime cost
> and no impact on address space layout or ABI.  Enable it by using the
> -fsanitize=undefined flag. [2]
> 
> Please note that the sanitizers still have some rough edges on FreeBSD,
> particularly on i386.  These will hopefully be smoothed out in the
> coming time.  Reports of problems (and fixes :) are very welcome, but
> please log them in Bugzilla, so they can be tracked.

These looks like welcomed addition(s).

Thank you, Dimitry!

--Chris
> 
> -Dimitry
> 
> [1] http://llvm.org/releases/3.5.0/tools/clang/docs/AddressSanitizer.html
> [2]
> http://llvm.org/releases/3.5.0/tools/clang/docs/UsersManual.html#opt-fsanitiz
Received on Tue Jan 13 2015 - 21:25:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:54 UTC