From owner-freebsd-current@FreeBSD.ORG Tue Jan 13 22:51:18 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B25A355D for ; Tue, 13 Jan 2015 22:51:18 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91106989 for ; Tue, 13 Jan 2015 22:51:18 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 5DC41192A3B for ; Tue, 13 Jan 2015 22:51:17 +0000 (UTC) Message-ID: <54B5A164.2040102@ignoranthack.me> Date: Tue, 13 Jan 2015 14:51:16 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: Connected sanitizer libraries to the build (for x86) References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:51:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/13/15 12:28, Dimitry Andric 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. > > -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-fsanitize-undefined > Do you want a test run for arm? sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUtaFkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k5nsH/iHhTW359K0f2BtUDBwH/+ga 9w7MbymRJZvKTh60LABeuN//DJ9BBRHzGHtRd5nYvvLSBN5HfVy2LbmNvz9H1p0B /Gw6N9XL3pVMpLxU4JP6IMJ6c1YIlrapDxfUPOVpEPmdOeZ2xPsgRDB20tDNuKxj AQftpNqf1KJL0FhzfKv0TupxPpCKuffTfO+kYa5tQQU/bDXkgxB1BsuxUD/4HiZU nRAsbhlZV1roEo3l36a2mlRtc6sEPpZTKn4Phv3oNT7cfCd5hnuhyCfcZOWk7yXo HyboVn10ABX8GismKQ0erkxNhcHD4VepY2CCc/0z+AhUV0DztpfLvzDoEE0lDaY= =DqeZ -----END PGP SIGNATURE-----