From owner-freebsd-toolchain@FreeBSD.ORG Tue Jan 13 20:28:19 2015 Return-Path: Delivered-To: freebsd-toolchain@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 D57A57EE; Tue, 13 Jan 2015 20:28:19 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E1983F; Tue, 13 Jan 2015 20:28:19 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::c148:42bb:70c4:c38e] (unknown [IPv6:2001:7b8:3a7:0:c148:42bb:70c4:c38e]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0C888B80A; Tue, 13 Jan 2015 21:28:15 +0100 (CET) From: Dimitry Andric X-Pgp-Agent: GPGMail 2.5b4 Content-Type: multipart/signed; boundary="Apple-Mail=_CCB9499A-2601-452E-962D-513777E93502"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Connected sanitizer libraries to the build (for x86) Date: Tue, 13 Jan 2015 21:28:08 +0100 Message-Id: To: FreeBSD Current Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) X-Mailer: Apple Mail (2.1993) Cc: FreeBSD Toolchain X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 20:28:19 -0000 --Apple-Mail=_CCB9499A-2601-452E-962D-513777E93502 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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=3Daddress = 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=3Dundefined 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-fsani= tize-undefined --Apple-Mail=_CCB9499A-2601-452E-962D-513777E93502 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlS1f94ACgkQsF6jCi4glqMhiQCg4mJcgwA97S2p+3a0oKHLyKM+ SdwAnR0ch0q1rrBja9TAzWOS8h78Mzcn =39z4 -----END PGP SIGNATURE----- --Apple-Mail=_CCB9499A-2601-452E-962D-513777E93502--