From patchwork Sun Oct 22 10:57:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3403 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:baa3:b0:f2:62eb:61c1 with SMTP id dt35csp824874dyb; Sun, 22 Oct 2023 03:58:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8pAb3doulKMoV8fB+B53+AagEypBTtiZafwQgrza4XPG9JHhjSeCeYjUNzg+1e8rcis/0 X-Received: by 2002:a05:6a21:33a4:b0:163:c167:964a with SMTP id yy36-20020a056a2133a400b00163c167964amr8714717pzb.1.1697972321408; Sun, 22 Oct 2023 03:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697972321; cv=none; d=google.com; s=arc-20160816; b=fN/GfXaxptkvCOlKEKfoJm6scvoqFSSM5wdOQ9ur27WggXuelxHQSZa3nWqYhFeZpJ eLbxtzw+BuybhDxoBtmU156Ot0Q72M4eClfdpriii/9GXLrMcUh25igeoc7D+J+TU/0u OQYt/PJCJZ1qmXsN8eiXV5a5nJ+XipEiOyPl72MdJdN5FeRbMaBdr455Eu4VP1KXiAgi ykgAdWrXWG7+hibE4dRZRtJyAGYOh3uYyp8dULA+KjPcsESpoo11elPcvEra5qznEW+Y X1Gb5d/kqBAkDR02jlQcoo9XDc9yDko1+F6yufHyR9pARRavLaTDx1KR3BpPpjmw1jbH fobg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=TLhX9tfLuyHpzPlwcWnP02lX42r55UNmwS+VFNhqq58=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=wIAHg1WshVEK/MSVVYV2WNr3CSDBXmY2ht9cz+NIaQQUMCEO51dy+HBh96TidCuc+k ESahqwIHcxMNj209T8mkKH8KefeHcigpXZTBvhBUqqP7V8vSZ4TYnnlbyljlQ7iIxWOW iVYb/SozQXZb+PBn3ztMdmO/zZIAc+ZhOJ3WVQrxNMz6pBkvBYliABhbTgf6YcJym+gi dIwhdoN39GLIDCDvJqxGixh/xuFzmihOL2Jl9q4zZCshgbNfWDiZBaOqyUwoHEwUq6CI s58tcF28/yUVYZ+o1/4LPvbAoEyKFBPYmyLEfwbtJeAtjZY795yTu9tc2ATvzxeljCdm jOeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="Udxk/sfI"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ng+3oWt9; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id s18-20020aa78bd2000000b006b7abfbf700si4601481pfd.394.2023.10.22.03.58.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Oct 2023 03:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="Udxk/sfI"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ng+3oWt9; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1quW9y-000417-Am; Sun, 22 Oct 2023 10:58:18 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1quW9w-000411-Mz for openvpn-devel@lists.sourceforge.net; Sun, 22 Oct 2023 10:58:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BItzwUeS2YbqVcSIMlqIaZ4C6Nv2/omyZq/e1YPRrgk=; b=Udxk/sfI9Gp1yaYzDsCRaPxSKj f91+tgdSOky+YSXU4AyZQIcGX+7eCwtQrwiGq1ysIO9XQuBExJhF994n6h7ziQmcKe+3Mnf4dCa0c JD66dRfYPUmncTCTK80oKKMMOwMzsDLY1YjpNe/TT7K3j6Yepl1Zfhtz2thQOw9cuCc0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BItzwUeS2YbqVcSIMlqIaZ4C6Nv2/omyZq/e1YPRrgk=; b=Ng+3oWt9w9e0E+DuBxWfjg1xQb t3iFkIr1JqYun4nZgqnUMLOMZtHOOOSY0lvuFo+6YIC6nFIlUI9YjWg28i7seSPRF//hI+HH+RiO/ B6Qm3iMCWg0UgpMmmMATQtKvLgFi6efwkJOuQmTsr4Fd2bM43sPCunkAVJbSTCEQQQxE=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1quW9t-00035S-Ai for openvpn-devel@lists.sourceforge.net; Sun, 22 Oct 2023 10:58:17 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 39MAw4IO021165 for ; Sun, 22 Oct 2023 12:58:04 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 39MAw44Y021164 for openvpn-devel@lists.sourceforge.net; Sun, 22 Oct 2023 12:58:04 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 22 Oct 2023 12:57:56 +0200 Message-ID: <20231022105756.21080-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arne Schwabe The -fno-sanitize-recover=all flag ensures that for all errors we actually abort the tests in the automated testing and not just print some errors in red that nobody sess. Also add the undefined tests [...] Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Headers-End: 1quW9t-00035S-Ai Subject: [Openvpn-devel] [PATCH] Add undefined and abort on error to clang sanaitize builds X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1780453025100051137?= X-GMAIL-MSGID: =?utf-8?q?1780453025100051137?= From: Arne Schwabe The -fno-sanitize-recover=all flag ensures that for all errors we actually abort the tests in the automated testing and not just print some errors in red that nobody sess. Also add the undefined tests to catch more bugs. For libreSSL we do not add the udefined behaviour as we have (even with the latest LibreSSL version) an undefined behaviour in LibreSSL itself. Change-Id: I204b396dea9f22d68e8e091d181a85ffebde4c17 Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/375 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 58fbc29..2a25582 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -186,7 +186,7 @@ - name: autoconf run: autoreconf -fvi - name: configure - run: CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2" CC=clang ./configure --with-crypto-library=${{matrix.ssllib}} + run: CFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -O2" CC=clang ./configure --with-crypto-library=${{matrix.ssllib}} - name: make all run: make -j3 - name: make check @@ -201,8 +201,8 @@ os: [macos-11, macos-12, macos-13] include: - build: asan - cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - ldflags: -fsanitize=address + cflags: "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + ldflags: -fsanitize=address,undefined -fno-sanitize-recover=all # Our build system ignores LDFLAGS for plugins configureflags: --disable-plugin-auth-pam --disable-plugin-down-root - build: normal @@ -300,8 +300,8 @@ configureflags: ["--with-openssl-engine=no"] include: - build: asan - cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - ldflags: -fsanitize=address + cflags: "-fsanitize=address -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + ldflags: -fsanitize=address -fno-sanitize-recover=all cc: clang - build: normal cflags: "-O2 -g"