[{"id":2505,"web_url":"https://patchwork.libcamera.org/comment/2505/","msgid":"<20190826214533.GI28351@bigcity.dyn.berto.se>","date":"2019-08-26T21:45:33","subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-08-19 16:02:45 +0300, Laurent Pinchart wrote:\n> _FORTIFY_SOURCE add useful checks during compilation. Enable it by\n> default, except for debug builds as it requires at least a -O1\n> optimisation level.\n\nI think this is a good idea, it's a shame we can't have it enabled for \ndebug builds. My normal workflow of \"meson build; ninja -C build\" \nproduces debug builds so if this catch a problem it will be at release \ntime.\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  meson.build | 6 ++++++\n>  1 file changed, 6 insertions(+)\n> \n> diff --git a/meson.build b/meson.build\n> index 13d0605f903c..53263d68791d 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -35,6 +35,12 @@ common_arguments = [\n>      '-include', 'config.h',\n>  ]\n>  \n> +if get_option('buildtype') != 'debug'\n> +    common_arguments += [\n> +        '-D_FORTIFY_SOURCE=1',\n> +    ]\n> +endif\n> +\n>  c_arguments = common_arguments\n>  cpp_arguments = common_arguments\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 843C2600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Aug 2019 23:45:36 +0200 (CEST)","by mail-lj1-x242.google.com with SMTP id l14so16486759ljj.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Aug 2019 14:45:36 -0700 (PDT)","from localhost (h-177-236.A463.priv.bahnhof.se. [217.31.177.236])\n\tby smtp.gmail.com with ESMTPSA id\n\tj3sm2288722lfp.34.2019.08.26.14.45.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Aug 2019 14:45:34 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=ulRzE/KxfUtH2BUvvr9s4N4P3N/2wfAwHOiRCTatJk8=;\n\tb=0qi2hd0/sbx56s5EgMYzVv1isl051q2Fa3lzyWzsbm9SKt8o16GA9rLcA+lAiRNq6q\n\tf9VvpUiOxwEcMOaRROVmsS1HK0NriIbEtPS9a93Plf8TO1cQUKyYdkvlDr8yZMNYKLNH\n\tt3TDPTjwsKtyIyibjOAPwE3ljRORaqmtSZzZ2RYHoy6NUesPLeXPdGVoAIKin6MiztCt\n\tm6DvK6Qyy4YQhC9gKc1GjKPIkDqft7po4A2DpvXDTn7UIZ4ZaRnWv/J3ZVq8Bh8DGC93\n\tZR75Jq5d6cPrxf27PFj24VLTEzbiWVqTEez0kF+l4sYMae2LA40Xhsk6Yi1WlsEvrIUI\n\tUfvg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=ulRzE/KxfUtH2BUvvr9s4N4P3N/2wfAwHOiRCTatJk8=;\n\tb=jmbvNkhr235zUA1iOTap+JYERjPdfgdOfF6Tyd0EGlcEora92w8VAoK+7BBzgd2EzG\n\to/8phSyUTQP1ft3IXH1ejvp7mN/zpXM2YOM7J/EC53CBYxo23lnWnXYXuuT+9vSblRDQ\n\tn8Mgqq2AUtOf3EEG1v2UfcICQ8fOnJ64qSnhInD3EJhGtTPuyPzfqm9EqHw9XLjgS0MN\n\tpGgL9mPQ0IbngqmMG52C1ucv5AFTXY/QtijqlL5kiYbmKPYgnlLa2AMFF+zYfMpbbL4h\n\tny1+ytAOFBKUBr2f1QTsBsKy4PtZVBZ6Vmj35m6aFY6C/xwFRJ6DIRGwyLj9jxM3u5kO\n\tn5kQ==","X-Gm-Message-State":"APjAAAWIPCddNxKmENcvz4HfHzvxkTWQhlxDedh2xpoCVbRR0CaMY51T\n\tf/GCjhZrjUz0OqHSxuPE7VcK/Y12HY0=","X-Google-Smtp-Source":"APXvYqxYZphah16PfIiSe8eQdd2pr9NJl1NLS3bp/pBK8jvt4d0QjOyl97sEVHgufEhWC6jZFQOe7w==","X-Received":"by 2002:a2e:a310:: with SMTP id\n\tl16mr10684036lje.47.1566855935403; \n\tMon, 26 Aug 2019 14:45:35 -0700 (PDT)","Date":"Mon, 26 Aug 2019 23:45:33 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190826214533.GI28351@bigcity.dyn.berto.se>","References":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 26 Aug 2019 21:45:36 -0000"}},{"id":2506,"web_url":"https://patchwork.libcamera.org/comment/2506/","msgid":"<20190826215144.GJ5031@pendragon.ideasonboard.com>","date":"2019-08-26T21:51:44","subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Mon, Aug 26, 2019 at 11:45:33PM +0200, Niklas Söderlund wrote:\n> On 2019-08-19 16:02:45 +0300, Laurent Pinchart wrote:\n> > _FORTIFY_SOURCE add useful checks during compilation. Enable it by\n> > default, except for debug builds as it requires at least a -O1\n> > optimisation level.\n> \n> I think this is a good idea, it's a shame we can't have it enabled for \n> debug builds. My normal workflow of \"meson build; ninja -C build\" \n> produces debug builds so if this catch a problem it will be at release \n> time.\n\nWe could change the default build type too.\n\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> > ---\n> >  meson.build | 6 ++++++\n> >  1 file changed, 6 insertions(+)\n> > \n> > diff --git a/meson.build b/meson.build\n> > index 13d0605f903c..53263d68791d 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -35,6 +35,12 @@ common_arguments = [\n> >      '-include', 'config.h',\n> >  ]\n> >  \n> > +if get_option('buildtype') != 'debug'\n> > +    common_arguments += [\n> > +        '-D_FORTIFY_SOURCE=1',\n> > +    ]\n> > +endif\n> > +\n> >  c_arguments = common_arguments\n> >  cpp_arguments = common_arguments\n> >","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B252D600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Aug 2019 23:51:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 262E29A4;\n\tMon, 26 Aug 2019 23:51:51 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566856311;\n\tbh=aWnjR4XveL/t2Y674S/YmsVGo+5G4nPsL+O06JAP1Ds=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PKHPAcGXhfopB5q+p4KI5yB7w55Bw+hCCQy7j6OCNf1majvEZs4MrmNBNW500Yk0c\n\tmTmlZdRK9KY9ik5yz0+2uYfNE7OEPlrtetNtqKj9t9vyorPYITRmkRz6H4ToiAciWD\n\tpWxNFK67mT9AEo3KnX2ChkkWgowYadq0uQNZK3I4=","Date":"Tue, 27 Aug 2019 00:51:44 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190826215144.GJ5031@pendragon.ideasonboard.com>","References":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>\n\t<20190826214533.GI28351@bigcity.dyn.berto.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190826214533.GI28351@bigcity.dyn.berto.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 26 Aug 2019 21:51:51 -0000"}},{"id":2507,"web_url":"https://patchwork.libcamera.org/comment/2507/","msgid":"<20190826220952.GJ28351@bigcity.dyn.berto.se>","date":"2019-08-26T22:09:52","subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nOn 2019-08-27 00:51:44 +0300, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> On Mon, Aug 26, 2019 at 11:45:33PM +0200, Niklas Söderlund wrote:\n> > On 2019-08-19 16:02:45 +0300, Laurent Pinchart wrote:\n> > > _FORTIFY_SOURCE add useful checks during compilation. Enable it by\n> > > default, except for debug builds as it requires at least a -O1\n> > > optimisation level.\n> > \n> > I think this is a good idea, it's a shame we can't have it enabled for \n> > debug builds. My normal workflow of \"meson build; ninja -C build\" \n> > produces debug builds so if this catch a problem it will be at release \n> > time.\n> \n> We could change the default build type too.\n\nThat is one option, another is that I change my workflow to also build \nand test release builds. I think there is value in keeping debug builds \nas the default.\n\n> \n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > \n> > > ---\n> > >  meson.build | 6 ++++++\n> > >  1 file changed, 6 insertions(+)\n> > > \n> > > diff --git a/meson.build b/meson.build\n> > > index 13d0605f903c..53263d68791d 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -35,6 +35,12 @@ common_arguments = [\n> > >      '-include', 'config.h',\n> > >  ]\n> > >  \n> > > +if get_option('buildtype') != 'debug'\n> > > +    common_arguments += [\n> > > +        '-D_FORTIFY_SOURCE=1',\n> > > +    ]\n> > > +endif\n> > > +\n> > >  c_arguments = common_arguments\n> > >  cpp_arguments = common_arguments\n> > >  \n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x144.google.com (mail-lf1-x144.google.com\n\t[IPv6:2a00:1450:4864:20::144])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 056BC60C10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2019 00:09:54 +0200 (CEST)","by mail-lf1-x144.google.com with SMTP id c12so2134589lfh.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Aug 2019 15:09:53 -0700 (PDT)","from localhost (h-177-236.A463.priv.bahnhof.se. [217.31.177.236])\n\tby smtp.gmail.com with ESMTPSA id\n\tc16sm68778lfj.8.2019.08.26.15.09.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Aug 2019 15:09:52 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=GxnQMV2A7eCC049QhqerMjjUrlAgIbXPC5ivFyLZacM=;\n\tb=fagU4bjMZCKw9k53HvFk8cjXjEj/mCy2rN20mcncZ/lwt4yZLDCiTSZJ4hOP6D0tFD\n\tBzRq3NP00gTBN4JpFYoECggibKyLTP54Z4gWXlRi6u4a4UarMBwPvCXndCoOb6WVEM0r\n\tTI11cZ1/blBjfWA1ur14SN+LOn4TpXy3pZPR+TaazjarbPjU+rHgZNTQHK4zqq25265U\n\tBxQ9Jyev0lsd/HVNz7Odkk0pnEgu+HhGvd+54mycj/svNdpuDvWRimKqWBqTPBtB6Gdg\n\t6f9qyUmHy8bjxG9u3MrRURFl3GJ5a6AeMAOW2rFjl7PIywHg3D42wedXsEgmuU8ozMio\n\tXnPA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=GxnQMV2A7eCC049QhqerMjjUrlAgIbXPC5ivFyLZacM=;\n\tb=aLgdpGdpXDvBPMaB9NEqaC43sTpT+MqNiRPsDC9fjctrJnbQb8VuHHMOLtfQLg1FJY\n\tv0Ob5wFa+lbejFmAj/r8/8WJawaNXXp4c6ffu6+ByIEuaiDO8tSYhlHJchMQIFM8NhNx\n\troK8lJM2/WNlwiFkGS5o+GkJkqLngO7FuUcuFCDFGRtgukcbfPM4Nn29PYZkkUxAmXLO\n\tN4MgP2FYyH0g1ZqzJWVs1NqLcf6uQYiv+3PoeprXI/Q4KGT3JZGsk7kQkenmPJW97XNZ\n\t9RHeZsawvX/dgMs3eLOwolf/gDDJ9NSQtg6V+AGNXRIHY5X1ve8wu43ZApc1XiKkFGvR\n\tGl+A==","X-Gm-Message-State":"APjAAAUwUd4LpqOQVnQ1CyZaCJaEYakpggUz9x3DgM3n2VUbvLrDVoRj\n\taFJia+xnIn0Ca040r2tmQjqw1g==","X-Google-Smtp-Source":"APXvYqxBDvqqzqiKmecs8oERApdgQHX2ctgoBgXlopDLh4cAeWpp7J7lydmjS4FtnAUiswh73BWNXw==","X-Received":"by 2002:ac2:4309:: with SMTP id l9mr12005482lfh.65.1566857393217;\n\tMon, 26 Aug 2019 15:09:53 -0700 (PDT)","Date":"Tue, 27 Aug 2019 00:09:52 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190826220952.GJ28351@bigcity.dyn.berto.se>","References":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>\n\t<20190826214533.GI28351@bigcity.dyn.berto.se>\n\t<20190826215144.GJ5031@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190826215144.GJ5031@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 26 Aug 2019 22:09:54 -0000"}},{"id":2508,"web_url":"https://patchwork.libcamera.org/comment/2508/","msgid":"<147c8a32-df2b-fc9a-4673-206b2fc4a67e@ideasonboard.com>","date":"2019-08-27T07:47:41","subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 26/08/2019 22:51, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> On Mon, Aug 26, 2019 at 11:45:33PM +0200, Niklas Söderlund wrote:\n>> On 2019-08-19 16:02:45 +0300, Laurent Pinchart wrote:\n>>> _FORTIFY_SOURCE add useful checks during compilation. Enable it by\n>>> default, except for debug builds as it requires at least a -O1\n>>> optimisation level.\n>>\n>> I think this is a good idea, it's a shame we can't have it enabled for \n>> debug builds. My normal workflow of \"meson build; ninja -C build\" \n>> produces debug builds so if this catch a problem it will be at release \n>> time.\n> \n> We could change the default build type too.\n\nI think we should keep our default build type as debug. During\ndevelopment we want debug symbols and any extra checks such as fail fast\nassertions. Yes it's annoying that we can't have /these/ extra checks at\nbuild time in debug too - but release builds will be built ...\n\nBuilding as release should be done by automated build processes.\n(which Mauro has already started) so should be caught there.\n\nSo for this, we just need to make sure Mauro's build is configured as a\nrelease build. Or better yet, has multiple build configurations.\n\n\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>\n>> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n>>\n>>> ---\n>>>  meson.build | 6 ++++++\n>>>  1 file changed, 6 insertions(+)\n>>>\n>>> diff --git a/meson.build b/meson.build\n>>> index 13d0605f903c..53263d68791d 100644\n>>> --- a/meson.build\n>>> +++ b/meson.build\n>>> @@ -35,6 +35,12 @@ common_arguments = [\n>>>      '-include', 'config.h',\n>>>  ]\n>>>  \n>>> +if get_option('buildtype') != 'debug'\n>>> +    common_arguments += [\n>>> +        '-D_FORTIFY_SOURCE=1',\n>>> +    ]\n>>> +endif\n>>> +\n>>>  c_arguments = common_arguments\n>>>  cpp_arguments = common_arguments\n>>>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E673160BF6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2019 09:47:44 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 61AF72F0;\n\tTue, 27 Aug 2019 09:47:44 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566892064;\n\tbh=TRwJbuivm217RAYX93jUHxlW4P4XVdfJWiSsNQD0xqI=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=inZtkPtlk41SA7v+ladYHt4HgI5+GF3d1SHjKrt7vtOQ51f8UBSFONwj7vFB1rYKc\n\tt3tvhV1dgoZ5W/ELTozY6WU930nrNU11PogDe7jj3ec7J1b8qTJ6ik6xlmtoS0jBd+\n\tGFbMICZ23NfDEaYHy3AVzCABSmzy+ZcRWAsz/M7Y=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Niklas?=\n\t=?utf-8?q?_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>\n\t<20190826214533.GI28351@bigcity.dyn.berto.se>\n\t<20190826215144.GJ5031@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham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NvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<147c8a32-df2b-fc9a-4673-206b2fc4a67e@ideasonboard.com>","Date":"Tue, 27 Aug 2019 08:47:41 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.8.0","MIME-Version":"1.0","In-Reply-To":"<20190826215144.GJ5031@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 27 Aug 2019 07:47:45 -0000"}},{"id":2509,"web_url":"https://patchwork.libcamera.org/comment/2509/","msgid":"<20190827075232.GD5054@pendragon.ideasonboard.com>","date":"2019-08-27T07:52:32","subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Tue, Aug 27, 2019 at 08:47:41AM +0100, Kieran Bingham wrote:\n> On 26/08/2019 22:51, Laurent Pinchart wrote:\n> > On Mon, Aug 26, 2019 at 11:45:33PM +0200, Niklas Söderlund wrote:\n> >> On 2019-08-19 16:02:45 +0300, Laurent Pinchart wrote:\n> >>> _FORTIFY_SOURCE add useful checks during compilation. Enable it by\n> >>> default, except for debug builds as it requires at least a -O1\n> >>> optimisation level.\n> >>\n> >> I think this is a good idea, it's a shame we can't have it enabled for \n> >> debug builds. My normal workflow of \"meson build; ninja -C build\" \n> >> produces debug builds so if this catch a problem it will be at release \n> >> time.\n> > \n> > We could change the default build type too.\n> \n> I think we should keep our default build type as debug. During\n> development we want debug symbols and any extra checks such as fail fast\n> assertions. Yes it's annoying that we can't have /these/ extra checks at\n> build time in debug too - but release builds will be built ...\n\ndebug builds for development makes sense, but a different default build\ntype might still make sense. What's the most common case, libcamera\ndevelopment, or libcamera packaging ? For us it's clearly development\n:-) I think we can postpone any change to the default build type, but at\nsome point we may want to reconsider, if only to avoid distribution\nincorrectly packaging a debug build.\n\n> Building as release should be done by automated build processes.\n> (which Mauro has already started) so should be caught there.\n> \n> So for this, we just need to make sure Mauro's build is configured as a\n> release build. Or better yet, has multiple build configurations.\n> \n> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>\n> >> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> >>\n> >>> ---\n> >>>  meson.build | 6 ++++++\n> >>>  1 file changed, 6 insertions(+)\n> >>>\n> >>> diff --git a/meson.build b/meson.build\n> >>> index 13d0605f903c..53263d68791d 100644\n> >>> --- a/meson.build\n> >>> +++ b/meson.build\n> >>> @@ -35,6 +35,12 @@ common_arguments = [\n> >>>      '-include', 'config.h',\n> >>>  ]\n> >>>  \n> >>> +if get_option('buildtype') != 'debug'\n> >>> +    common_arguments += [\n> >>> +        '-D_FORTIFY_SOURCE=1',\n> >>> +    ]\n> >>> +endif\n> >>> +\n> >>>  c_arguments = common_arguments\n> >>>  cpp_arguments = common_arguments\n> >>>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1388A60BF6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2019 09:52:39 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7916D2F0;\n\tTue, 27 Aug 2019 09:52:38 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566892358;\n\tbh=Bhg9k7Wsf6uVzmbzr+mdkF63Ebp3FFHcnpN6SpD0L+Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jXgJ5kSQOf8yZqYUkLX57VtkmOvijyTnBcXUsnpluL2aklwwmQ5/mgWp/anW99EAb\n\tvu2h3OS/YjFikqNUc218uf9DWv+JpOhehWR5gFo2rd5sY7i+EE64gUz9Mbn7nGK/Hx\n\tvElg42wBRKPyzqsgFerk1thggF2DFcKTthYagWno=","Date":"Tue, 27 Aug 2019 10:52:32 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190827075232.GD5054@pendragon.ideasonboard.com>","References":"<20190819130245.7298-1-laurent.pinchart@ideasonboard.com>\n\t<20190826214533.GI28351@bigcity.dyn.berto.se>\n\t<20190826215144.GJ5031@pendragon.ideasonboard.com>\n\t<147c8a32-df2b-fc9a-4673-206b2fc4a67e@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<147c8a32-df2b-fc9a-4673-206b2fc4a67e@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] meson: Define _FORTIFY_SOURCE for\n\tnon-debug builds","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 27 Aug 2019 07:52:39 -0000"}}]