[{"id":33474,"web_url":"https://patchwork.libcamera.org/comment/33474/","msgid":"<855xkyh07m.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-02-25T08:56:13","subject":"Re: [PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> A base class with virtual functions and a non-virtual public destructor\n> is prone to undefined behaviourif deleted from a pointer to the base.\n> Enable the -Wnon-virtual-dtor warning to report those issues.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  meson.build | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/meson.build b/meson.build\n> index 5270f626f2fb..f8d32dcf8d7a 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -110,7 +110,9 @@ common_arguments = [\n>  ]\n>  \n>  c_arguments = []\n> -cpp_arguments = []\n> +cpp_arguments = [\n> +    '-Wnon-virtual-dtor',\n> +]\n>  \n>  cxx_stdlib = 'libstdc++'","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9B0F4BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Feb 2025 08:56:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 53B6768718;\n\tTue, 25 Feb 2025 09:56:20 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EB5BC68697\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Feb 2025 09:56:18 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-611-TPq_H2q_OMeiQFMGRxK4ww-1; Tue, 25 Feb 2025 03:56:16 -0500","by mail-wm1-f69.google.com with SMTP id\n\t5b1f17b1804b1-43941ad86d4so27321885e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Feb 2025 00:56:16 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb (nat-pool-brq-t.redhat.com.\n\t[213.175.37.10]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-439b0371c67sm131218065e9.34.2025.02.25.00.56.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 25 Feb 2025 00:56:14 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"FyujpYkD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1740473777;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=MDABDIkBOhJHYp4FP7ApfsRYVXfhcflch5EsWsWyBiU=;\n\tb=FyujpYkDLmSwCHmcdT/3Mwg4LNLi5MmcjLXillUsD9AktKOj+x+F5qHSeRTELvogrgclNN\n\tO0UP5CHMm+Lml4WZvHls29h3Ume9e8gP9B0zh+Q+2BR8b9rYZB+KZ+NzfQ0ZIdKpTIBXlM\n\tAazs3oYexPP6rv48XAx64b2eDUiyxmw=","X-MC-Unique":"TPq_H2q_OMeiQFMGRxK4ww-1","X-Mimecast-MFC-AGG-ID":"TPq_H2q_OMeiQFMGRxK4ww_1740473775","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1740473775; x=1741078575;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=MDABDIkBOhJHYp4FP7ApfsRYVXfhcflch5EsWsWyBiU=;\n\tb=JlgMZGb3QApm+QfT/kbVKGf3h14mk5DpUnn8ThsIEESHrxDtRPQG09Ylpdl+omdQP3\n\ts0nUYkMIpnaVj/Oywk/+gdBc1u7k5BLfgZcJOsiO/lZGhpzf2oQKNQCDgdA8//GpxPrO\n\t6qsKsjGXqhAgNCJs1PPolJUHdxMeXbCjyg6TCinGndWY0Y8s3JbS/6DGJSjw7TaVJnJB\n\t5drgRR3vhr5cD7SIOBrlJd2XpGMdFHE1azFVasspUTWsIPWdjFLNhpxHqNKvTGIWMQZz\n\tZWeFrXqsd65d9oGk8AteDJ2EOT4ddRvrTBe3JVKjv0vfs1kqA3JsvEuwCJEASVAdLwgc\n\tHQLQ==","X-Gm-Message-State":"AOJu0Yw7d+omnk/LgSM6oHyLJ2w6OjyldJ0DvOBGgt+jUSqHFz/kgZuK\n\tAO21AxmXYUBZ3AjAjHAOtsJ1oDga0A85H0AeJwqFqcODaRUpDq9kpugA4D3gMogeXbxF1pr8shh\n\thiSw9co5DMM9gH6LuY06pIENOXj7OWNSwuULcvOMuCZincdqBv0ocWRG6B/65kQi0tR9/1w0=","X-Gm-Gg":"ASbGncvBXdf8wGth0qqWA2DolFnlc/WD9mbyxqfmvxSVhhGwpi39nliuZb4x6+CODAh\n\tAWWQ5ByKoGxGPzgaiZXQDCR6sHXftjmFPNHM8IcroDVhvvIGi/0jlSUupfhqtqApbPcrzNQX1o5\n\t+Yp90Y8FNWOE9t9/nVs+6f9Xof/+0rvasEhsTaaBlwBao8RVfrypdKqT0QPsl6l6YPIVUlxcMgY\n\tGB8pw/VEm2iOKZCXjeo4Oxlp8NwDKDuniaTRt17bJRTFxCUEtz1e/ci7epMxWMQtyZdENT3LH43\n\tmupNNy40JZn0YRCwPJk5w/zTr0GINRz85U1oI7yYJYwYQVK7118BRQnewjIKMe7pMME=","X-Received":["by 2002:a05:600c:1d1a:b0:439:a4a5:b86d with SMTP id\n\t5b1f17b1804b1-439aea9be73mr148809245e9.0.1740473775199; \n\tTue, 25 Feb 2025 00:56:15 -0800 (PST)","by 2002:a05:600c:1d1a:b0:439:a4a5:b86d with SMTP id\n\t5b1f17b1804b1-439aea9be73mr148809075e9.0.1740473774907; \n\tTue, 25 Feb 2025 00:56:14 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IH1qNU81X7Ti6u2zVB0zwG0fETTvLN9XB2y8bc9ZZ6+jlH+OvhPVNeNEkQoMHbHbinQbrK5uA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Stefan Klug\n\t<stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option","In-Reply-To":"<20250224220438.21512-3-laurent.pinchart@ideasonboard.com>\n\t(Laurent Pinchart's message of \"Tue, 25 Feb 2025 00:04:38 +0200\")","References":"<20250224220438.21512-1-laurent.pinchart@ideasonboard.com>\n\t<20250224220438.21512-3-laurent.pinchart@ideasonboard.com>","Date":"Tue, 25 Feb 2025 09:56:13 +0100","Message-ID":"<855xkyh07m.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"5XFsHx-F2fhxKWmFOd7X6MkH1IKGHHdT4IjficV0d3g_1740473775","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":33481,"web_url":"https://patchwork.libcamera.org/comment/33481/","msgid":"<eh3kzvvukccmchjxiuvmlpuublm42ax3yzouelvino65mf4zxm@hbzjj6iwmccn>","date":"2025-02-25T22:11:21","subject":"Re: [PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch. \n\nOn Tue, Feb 25, 2025 at 12:04:38AM +0200, Laurent Pinchart wrote:\n> A base class with virtual functions and a non-virtual public destructor\n> is prone to undefined behaviourif deleted from a pointer to the base.\n> Enable the -Wnon-virtual-dtor warning to report those issues.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\nCheers,\nStefan\n\n> ---\n>  meson.build | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 5270f626f2fb..f8d32dcf8d7a 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -110,7 +110,9 @@ common_arguments = [\n>  ]\n>  \n>  c_arguments = []\n> -cpp_arguments = []\n> +cpp_arguments = [\n> +    '-Wnon-virtual-dtor',\n> +]\n>  \n>  cxx_stdlib = 'libstdc++'\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 80734BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Feb 2025 22:11:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36AE36872C;\n\tTue, 25 Feb 2025 23:11:25 +0100 (CET)","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 E42AE686D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Feb 2025 23:11:23 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:20f2:ccd6:fd0b:f3d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9688C73B;\n\tTue, 25 Feb 2025 23:09:56 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DZNsESSa\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740521396;\n\tbh=S46yYGdz8zWdVTQbuF8Xbx4/jd+mm/iMUdJdKywGnn8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DZNsESSa9Qtut3lX0iCmnGGY2cri9+K/Ri/tJSGGArmNmF3S/G5ks6b4xh8haJz0U\n\tE38HtSUIk+UbRUb9tnTdgFgPkeeGq99CvjTNvZ/FyV6as9vnBhp7qSwN1jlxnpSIfK\n\tb78ychRt3vZzv3M+eiiZz8vuYWvsPqGMKj5dHINg=","Date":"Tue, 25 Feb 2025 23:11:21 +0100","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option","Message-ID":"<eh3kzvvukccmchjxiuvmlpuublm42ax3yzouelvino65mf4zxm@hbzjj6iwmccn>","References":"<20250224220438.21512-1-laurent.pinchart@ideasonboard.com>\n\t<20250224220438.21512-3-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250224220438.21512-3-laurent.pinchart@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]