From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 5 02:37:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14F83106566C for ; Wed, 5 Sep 2012 02:37:58 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id D18338FC0A for ; Wed, 5 Sep 2012 02:37:57 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so155382pbb.13 for ; Tue, 04 Sep 2012 19:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=QRJpk9MbPBGpDMQtQ341Xs4ApmowDM+5x4rp6/aNjKw=; b=O7DBPdfQqJQS4EZwLqkunCNH8DJ1kiI5b6ZNLTm6eR3JCw/AWV+Jc2nu4x+zxuI08b Q8li4q95j4BZg6gYHoAlu5IULbVBCl7H64348gedBiR7HxHdEauIOWbIgKmaxf9gwVA2 etGpkGoGsLq7QGVR59pQSziszGpB0CE6bJV1A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=QRJpk9MbPBGpDMQtQ341Xs4ApmowDM+5x4rp6/aNjKw=; b=hUZaptzS0BwjwbELguHHQx0QxvNIPLrhr3DbRTGO2xyv7LcOE8K9SMg31khokPPjdi wxUU7VHbo8gepo1D4V92+3GOGUfskvv0AZqjIYOb3f7LltOi8gB9ly6xbVfCu7z6iC0I Hck/C15I+R37eHwk8zLHcHHDOaJJUdnm1mw2sqrEvRWTo2NnbutPwIt10F/x7LPUo3ME eyyGasTrbqSfecDO3vV6JI4k89bRfgqnnZi9dLu1BGyi82BYEVk1Yt0sOvj2L1DvIDB2 a/3iqE5VUGfoT31OwIge/3HMwtoYKyXcIjftCEe8GyEpqLMj8bVwUUwee2udaFaukZ9V oCkw== Received: by 10.66.74.100 with SMTP id s4mr45488672pav.27.1346812677387; Tue, 04 Sep 2012 19:37:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.67.4.227 with HTTP; Tue, 4 Sep 2012 19:37:26 -0700 (PDT) In-Reply-To: <504677AB.8040908@FreeBSD.org> References: <53c5133d8fac4f4353eda0add82e2234@viper-webmail.viper.enta.net> <504677AB.8040908@FreeBSD.org> From: Eitan Adler Date: Tue, 4 Sep 2012 22:37:26 -0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQn53+9pEDuY8PCUWfcmlxLaZlogDSoViit6OPs6BLhwFn9Vp4vKpEU8kPhASJFbJBoseGtf Cc: Jake Smith , freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Building with WITH_DEBUG (-g) in make.conf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 02:37:58 -0000 On 4 September 2012 17:50, Dimitry Andric wrote: > On 2012-09-04 17:53, Eitan Adler wrote: >> >> On 4 September 2012 05:26, Jake Smith wrote: > > ... > >>> It got me thinking, is there any reason why it would be a bad idea to >>> build >>> all my ports with debug symbols from now on? >> >> >>> Are there any performance hits >> >> >> Yes. Code size grows and the flags may enable internal >> debugging in the program itself. > > > There's a difference between just using '-g', which should never change > the behaviour of the program at runtime, and adding -DDEBUG or similar > flags on the command line, which may or may not enable extra code, or > even cause totally different code paths. My "no" was relating to debug information specifically. Changing the codepath in any way may open the door to new vulnerabilities. There is nothing specific to this being a debug option that makes this an issue. That said, I should have been more precise. :) -- Eitan Adler