From owner-freebsd-toolchain@FreeBSD.ORG Tue Oct 22 13:14:28 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB80FE31 for ; Tue, 22 Oct 2013 13:14:28 +0000 (UTC) (envelope-from squid@peralex.com) Received: from mail.peralex.com (mail.peralex.com [41.164.8.44]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53CB62A75 for ; Tue, 22 Oct 2013 13:14:27 +0000 (UTC) Received: from [192.168.1.102] (www2.peralex.com [41.164.8.42]) (Authenticated sender: mark@nmail.ct) by mail.peralex.com (Postfix) with ESMTPSA id 626D5336F2B for ; Tue, 22 Oct 2013 15:04:51 +0200 (SAST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=peralex.com; s=default; t=1382447091; bh=wQu6/kC8/1vSOo2jj5Lb19rotaB0fEmMIH5omt1uwsc=; h=Date:From:To:Subject; b=ntSPGYUDH2HPWhk264EthsObDvJhuPDazSQxsAco4Ov9HUCs3/jUKMqFPiM+VAKR7 h569LA52Un1DbEuFI+lnV3ceWZGEUxHs4kj0TAZcrY1t1T7Fcwx0BJk2aXmPwgbQrC qkUH7kJWZfDAjsxKBP87MyaSfx5kTbkAyXi2tLp8= Message-ID: <5266780F.70201@peralex.com> Date: Tue, 22 Oct 2013 15:05:19 +0200 From: squid@peralex.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-toolchain@freebsd.org Subject: clang sanitizers (memory, address, etc) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.peralex.com); Tue, 22 Oct 2013 15:04:51 +0200 (SAST) X-Scanned-By: MIMEDefang 2.74 on 41.164.8.44 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2013 13:14:28 -0000 Good day, I'm running current, and I've managed to compile, but not link some code using -sanitizer=memory. The linker is missing some symbols (__msan_memcpy and others), and I can't find the appropriate library. I've found no mention of anybody using the sanitizers on FreeBSD though. Are those symbols available for FreeBSD, and if so, what library are they in? Or are the sanitizers only available for Linux? Thanks Mark From owner-freebsd-toolchain@FreeBSD.ORG Tue Oct 22 16:31:05 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E8D2CA9 for ; Tue, 22 Oct 2013 16:31:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9ED2693 for ; Tue, 22 Oct 2013 16:31:04 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::206e:4072:a9e9:aa9f] (unknown [IPv6:2001:7b8:3a7:0:206e:4072:a9e9:aa9f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EE9565C5A; Tue, 22 Oct 2013 18:30:53 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_12A32AB1-4BCE-457F-973A-1468ABB78A8E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: clang sanitizers (memory, address, etc) From: Dimitry Andric In-Reply-To: <5266780F.70201@peralex.com> Date: Tue, 22 Oct 2013 18:30:45 +0200 Message-Id: References: <5266780F.70201@peralex.com> To: squid@peralex.com X-Mailer: Apple Mail (2.1510) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Oct 2013 16:31:05 -0000 --Apple-Mail=_12A32AB1-4BCE-457F-973A-1468ABB78A8E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Oct 22, 2013, at 15:05, squid@peralex.com wrote: > I'm running current, and I've managed to compile, but not link some code > using -sanitizer=memory. The linker is missing some symbols > (__msan_memcpy and others), and I can't find the appropriate library. > I've found no mention of anybody using the sanitizers on FreeBSD though. > > Are those symbols available for FreeBSD, and if so, what library are > they in? Or are the sanitizers only available for Linux? The sanitizers have not yet been ported, and while I have heard that some work was done, there is no coordinated effort yet. This is one of the many items on my todo-lists, but other things came first... -Dimitry --Apple-Mail=_12A32AB1-4BCE-457F-973A-1468ABB78A8E 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.20 (Darwin) iEYEARECAAYFAlJmqEEACgkQsF6jCi4glqMubQCg+iSZ/XyFC47KGaNff+7p5uED Z0oAmwSXy6EEWIbPAiMbppS3FvNO9TQ4 =Ttah -----END PGP SIGNATURE----- --Apple-Mail=_12A32AB1-4BCE-457F-973A-1468ABB78A8E-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Oct 23 06:17:04 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DF230161; Wed, 23 Oct 2013 06:17:04 +0000 (UTC) (envelope-from squid@peralex.com) Received: from mail.peralex.com (mail.peralex.com [41.164.8.44]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 759D32474; Wed, 23 Oct 2013 06:17:04 +0000 (UTC) Received: from [192.168.1.102] (www2.peralex.com [41.164.8.42]) (Authenticated sender: mark@nmail.ct) by mail.peralex.com (Postfix) with ESMTPSA id 53A62336F5F; Wed, 23 Oct 2013 08:16:35 +0200 (SAST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=peralex.com; s=default; t=1382508995; bh=AK7/TvKGvpaI0s3VDBylOKdtZRG9+O48HzEM4Px5jf8=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=UbpdeVvLDucVf6CzTRFWH/HLUXrpr4uaUmR/3V0+nNXdYf1oWr50L+wFxKlJUCUn9 YGvCoaqSTcvGJ/pj8w6vUZ6LX0cCjiPOhIi9HEcUY77tS4BO37pd9TFz+9pxDCgfjS /sPhZlaAbTn5ZjEjFP1zKGOmU/V6tLhfSvYfJ5Hw= Message-ID: <526769DF.5020805@peralex.com> Date: Wed, 23 Oct 2013 08:17:03 +0200 From: squid@peralex.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: clang sanitizers (memory, address, etc) References: <5266780F.70201@peralex.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.peralex.com); Wed, 23 Oct 2013 08:16:35 +0200 (SAST) X-Scanned-By: MIMEDefang 2.74 on 41.164.8.44 Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 06:17:04 -0000 On 2013-10-22 18:30, Dimitry Andric wrote: > > The sanitizers have not yet been ported, and while I have heard that > some work was done, there is no coordinated effort yet. This is one of > the many items on my todo-lists, but other things came first... > Thanks. I look forward to that. I'll have a look myself, but I suspect the work involved is beyond my skill set. Mark From owner-freebsd-toolchain@FreeBSD.ORG Wed Oct 23 13:10:38 2013 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77E7D763; Wed, 23 Oct 2013 13:10:38 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48BA42D43; Wed, 23 Oct 2013 13:10:37 +0000 (UTC) Received: from [10.60.213.211] (173-13-112-142-NewEngland.hfc.comcastbusiness.net [173.13.112.142]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r9NDATCk051494 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 23 Oct 2013 13:10:30 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: clang sanitizers (memory, address, etc) From: David Chisnall In-Reply-To: <526769DF.5020805@peralex.com> Date: Wed, 23 Oct 2013 14:10:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <70880890-4C9F-482E-AF44-0774114320F9@FreeBSD.org> References: <5266780F.70201@peralex.com> <526769DF.5020805@peralex.com> To: squid@peralex.com X-Mailer: Apple Mail (2.1508) Cc: freebsd-toolchain@FreeBSD.org, Dimitry Andric X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 13:10:38 -0000 On 23 Oct 2013, at 07:17, squid@peralex.com wrote: > Thanks. I look forward to that. I'll have a look myself, but I = suspect > the work involved is beyond my skill set. I had a chat with some of the *san people (mostly from Google Moscow) = quite recently. They've refactored most of the code so it should be = fairly obvious where the platform-specific bigs are. In most cases, = it's just some interposition on malloc() and friends, which should be = relatively easy to port. I'd love for us to have this stuff in the base system, and even versions = of the base libraries (and programs) compiled to use them. David From owner-freebsd-toolchain@FreeBSD.ORG Thu Oct 24 07:42:00 2013 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0962D23; Thu, 24 Oct 2013 07:42:00 +0000 (UTC) (envelope-from squid@peralex.com) Received: from mail.peralex.com (mail.peralex.com [41.164.8.44]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC46215C; Thu, 24 Oct 2013 07:41:59 +0000 (UTC) Received: from [192.168.1.102] (www2.peralex.com [41.164.8.42]) (Authenticated sender: mark@nmail.ct) by mail.peralex.com (Postfix) with ESMTPSA id 5F342336F2C; Thu, 24 Oct 2013 09:41:27 +0200 (SAST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=peralex.com; s=default; t=1382600487; bh=+6E3fXUnwhI6UB9spyPsTJizpfQdt2GlES+i/+bRsyA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=OusEhWRCMYnqQ4v/SkqwhY4HAdJWSw1KERah9zQfwb+RuGBRvHAkOYjDXaK2KYZm6 b59K4U/CCCI455tity9QE4R8wuBbd5iUYibuydKm/uxhJ7wiGW1mqbbFjYHC4vBizp C39Es6M1SvYT63DvrgPZkjomEDmveaDJUaiHWAj8= Message-ID: <5268CF45.6020502@peralex.com> Date: Thu, 24 Oct 2013 09:41:57 +0200 From: squid@peralex.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: David Chisnall Subject: Re: clang sanitizers (memory, address, etc) References: <5266780F.70201@peralex.com> <526769DF.5020805@peralex.com> <70880890-4C9F-482E-AF44-0774114320F9@FreeBSD.org> In-Reply-To: <70880890-4C9F-482E-AF44-0774114320F9@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.peralex.com); Thu, 24 Oct 2013 09:41:27 +0200 (SAST) X-Scanned-By: MIMEDefang 2.74 on 41.164.8.44 Cc: freebsd-toolchain@FreeBSD.org, Dimitry Andric X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 07:42:00 -0000 On 2013-10-23 15:10, David Chisnall wrote: > > I had a chat with some of the *san people (mostly from Google Moscow) quite recently. They've refactored most of the code so it should be fairly obvious where the platform-specific bigs are. In most cases, it's just some interposition on malloc() and friends, which should be relatively easy to port. > > I'd love for us to have this stuff in the base system, and even versions of the base libraries (and programs) compiled to use them. > Thanks, I'll have a look. Where can I find the sanitizer runtime library code? Mark From owner-freebsd-toolchain@FreeBSD.ORG Thu Oct 24 09:44:54 2013 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AD852623; Thu, 24 Oct 2013 09:44:54 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C1422C81; Thu, 24 Oct 2013 09:44:54 +0000 (UTC) Received: from [10.60.213.211] (173-13-112-142-NewEngland.hfc.comcastbusiness.net [173.13.112.142]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r9O9iqcZ056715 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 24 Oct 2013 09:44:53 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: clang sanitizers (memory, address, etc) From: David Chisnall In-Reply-To: <5268CF45.6020502@peralex.com> Date: Thu, 24 Oct 2013 10:44:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5266780F.70201@peralex.com> <526769DF.5020805@peralex.com> <70880890-4C9F-482E-AF44-0774114320F9@FreeBSD.org> <5268CF45.6020502@peralex.com> To: squid@peralex.com X-Mailer: Apple Mail (2.1508) Cc: freebsd-toolchain@FreeBSD.org, Dimitry Andric X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 09:44:54 -0000 On 24 Oct 2013, at 08:41, squid@peralex.com wrote: > On 2013-10-23 15:10, David Chisnall wrote: >>=20 >> I had a chat with some of the *san people (mostly from Google Moscow) = quite recently. They've refactored most of the code so it should be = fairly obvious where the platform-specific bigs are. In most cases, = it's just some interposition on malloc() and friends, which should be = relatively easy to port. >>=20 >> I'd love for us to have this stuff in the base system, and even = versions of the base libraries (and programs) compiled to use them. >>=20 >=20 > Thanks, I'll have a look. Where can I find the sanitizer runtime = library > code? The sanitizer runtimes are all part of compiler-rt: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ David