Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1692E18FE8 for ; Tue, 12 Jan 2016 15:32:07 +0000 (UTC) Received: (qmail 68311 invoked by uid 500); 12 Jan 2016 15:32:06 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 68232 invoked by uid 500); 12 Jan 2016 15:32:06 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 68219 invoked by uid 99); 12 Jan 2016 15:32:06 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2016 15:32:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2F7B91A0B27 for ; Tue, 12 Jan 2016 15:32:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -12.101 X-Spam-Level: X-Spam-Status: No, score=-12.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_WHITELIST=-15] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=B+E0oZ05; dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=lb5+PeGV Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Bp-BNdY-c6Sx for ; Tue, 12 Jan 2016 15:31:57 +0000 (UTC) Received: from mrout5.yahoo.com (mrout5.yahoo.com [216.145.54.154]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 2150131AE1 for ; Tue, 12 Jan 2016 15:31:55 +0000 (UTC) Received: from omp1006.mail.ne1.yahoo.com (omp1006.mail.ne1.yahoo.com [98.138.87.6]) by mrout5.yahoo.com (8.14.9/8.14.9/y.out) with ESMTP id u0CFVJKf097274 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 12 Jan 2016 07:31:19 -0800 (PST) Received: (qmail 67426 invoked by uid 1000); 12 Jan 2016 15:31:19 -0000 X-YMail-OSG: 97lM5pgVM1neLGT9OnyQ57TP2lu01JPi4nrWFRSAMlhC1QOsDBzgs4xQ9dfNOnY vAMt8ok7Sef2sxFiW680QWXiDnZk0qDHiakP.0TDFuU6MA7fWZzMWUbxhxMuubzffmeZ24J0YZjg lmmFbgBg7vKPxCx_scht2EEZVmySu5RaVCupTKNP73TLW4QVmrQWzbAqgjQ66ub14wY1M0fBlZj. Pm5Ig.NIj5ftgL24sgI4bLBHMfVQ9VTnTsCMp6Q-- Received: by 98.138.101.165; Tue, 12 Jan 2016 15:31:18 +0000 Date: Tue, 12 Jan 2016 15:31:14 +0000 (UTC) From: Jason Kenny Reply-To: Jason Kenny To: "dev@trafficserver.apache.org" Message-ID: <1075055997.3113210.1452612674678.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: Build with ASAN MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3113209_1230534261.1452612674669" ------=_Part_3113209_1230534261.1452612674669 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I have not built with asan with clang on the mac. I have built for RHEL 6 a= nd 7. I had to configure with these options. CXXFLAGS -fno-omit-frame-pointer -fsanitize=3Daddress -static-libasan\ CFLAGS=3D"-fno-omit-frame-pointer -fsanitize=3Daddress -static-libasan"\--d= isable-freelist\LUA_LDFLAGS=3D"-fno-omit-frame-pointer -fsanitize=3Daddress= -pthread -static-libasan" This seemed to work for me. On newer systems i was having issues with Lua b= reaking the build as the tools has memory leaks in it. You can work around = it by disabling Lua or just trying to add flags to CXXFLAGS at risk that so= mething might not be reported correctly in the lua and or c code. On linux at least if i was getting link errors it was because the libasan l= ibrary was not installed. The mac from my experience is different from linux so this might not transl= ate to the mac 100% Hope this helps=C2=A0Jason=C2=A0 =20 From: Masakazu Kitajo To: dev@trafficserver.apache.org=20 Sent: Tuesday, January 12, 2016 2:40 AM Subject: Build with ASAN =20 Hi there, I can enable ASAN with -fsanitize=3Daddress flag but I also needed to remov= e -no-undefined flag manually from some modules' Makefiles. Without the modification, I get link errors such like below: https://paste.apache.org/5sR6 According to the wiki, it seems we can't use ASAN with -no-undefined. https://github.com/google/sanitizers/wiki/AddressSanitizer So my questions are: - How do you enable ASAN? (How/Where do you specify the flag?) - How can I avoid the link error without manual modifications? My build environment is OS X (Yosemite) with Apple LLVM version 7.0.2 (clang-700.1.81) Thanks, Masakazu ------=_Part_3113209_1230534261.1452612674669--