From: "cron2 (Code Review)" Date: Sun, 22 Oct 2023 11:03:25 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <4f2d6fb554b2b9d1a9840ffcaf71bad83eba7469-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="s9KVGJ2xeKI="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Add undefined and abort on error to clang sanitize builds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --s9KVGJ2xeKI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/37= 5?usp=3Demail ) Change subject: Add undefined and abort on error to clang sanitize builds ...................................................................... Add undefined and abort on error to clang sanitize builds The -fno-sanitize-recover=3Dall 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 sees. 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 Message-Id: <20231022105756.21080-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27= 278.html Signed-off-by: Gert Doering --- M .github/workflows/build.yaml 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 58fbc29..06567e0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -186,7 +186,7 @@ - name: autoconf run: autoreconf -fvi - name: configure - run: CFLAGS=3D"-fsanitize=3Daddress -fno-omit-frame-pointer -O2" C= C=3Dclang ./configure --with-crypto-library=3D${{matrix.ssllib}} + run: CFLAGS=3D"-fsanitize=3Daddress,undefined -fno-sanitize-recove= r=3Dall -fno-omit-frame-pointer -O2" CC=3Dclang ./configure --with-crypto-= library=3D${{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=3Daddress -fno-optimize-sibling-calls -fsa= nitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - ldflags: -fsanitize=3Daddress + cflags: "-fsanitize=3Daddress,undefined -fno-sanitize-recover= =3Dall -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno= -omit-frame-pointer -g -O1" + ldflags: -fsanitize=3Daddress,undefined -fno-sanitize-recover= =3Dall # Our build system ignores LDFLAGS for plugins configureflags: --disable-plugin-auth-pam --disable-plugin-do= wn-root - build: normal @@ -300,8 +300,8 @@ configureflags: ["--with-openssl-engine=3Dno"] include: - build: asan - cflags: "-fsanitize=3Daddress -fno-optimize-sibling-calls -fsa= nitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - ldflags: -fsanitize=3Daddress + cflags: "-fsanitize=3Daddress -fno-sanitize-recover=3Dall -fn= o-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame= -pointer -g -O1" + ldflags: -fsanitize=3Daddress -fno-sanitize-recover=3Dall cc: clang - build: normal cflags: "-O2 -g" -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/375?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I204b396dea9f22d68e8e091d181a85ffebde4c17 Gerrit-Change-Number: 375 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --s9KVGJ2xeKI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

Add undefined and abort on error to clang sani=
tize builds

The -fno-sanitize-recover=3Dall flag ensures that for al= l errors we actually
abort the tests in the automated testing and not ju= st print some errors in red
that nobody sees. Also add the undefined tes= ts to catch more bugs.

For libreSSL we do not add the udefined behav= iour as we have (even with the
latest LibreSSL version) an undefined beh= aviour in LibreSSL itself.

Change-Id: I204b396dea9f22d68e8e091d181a8= 5ffebde4c17
Acked-by: Frank Lichtenheld <frank@...2641...>
Mess= age-Id: <20231022105756.21080-1-gert@...1296...>
URL: https://www.= mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27278.html
Signe= d-off-by: Gert Doering <gert@...1296...>
---
M .github/workflow= s/build.yaml
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml=

index 58fbc29..06567e0 100644
--- a/.githu= b/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -186,7 +186,7 @@
- name: autoconf<= /span>
run: autoreconf -fvi
- name= : configure
- ru= n: CFLAGS=3D"-fsanitize=3Daddress -fno-omit-frame-pointer -O2" CC= =3Dclang ./configure --with-crypto-library=3D${{matrix.ssllib}}
<= span style=3D"color: hsl(120, 100%, 40%);">+ run: CFLAGS=3D"-fs= anitize=3Daddress,undefined -fno-sanitize-recover=3Dall -fno-omit-frame-po= inter -O2" CC=3Dclang ./configure --with-crypto-library=3D${{matrix.ss= llib}}

- name: make all
run= : make -j3
- name: make check
@@ -20= 1,8 +201,8 @@
os: [macos-11, macos-12, macos-13]
include:
- build: asan
- cflags: &qu= ot;-fsanitize=3Daddress -fno-optimize-sibling-calls -fsanitize-address-use-= after-scope -fno-omit-frame-pointer -g -O1"
- ldflags: -fsanitize=3Daddress=
+ cflags: "= -fsanitize=3Daddress,undefined -fno-sanitize-recover=3Dall -fno-optimize-s= ibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g = -O1"
+ = ldflags: -fsanitize=3Daddress,undefined -fno-sanitize-recover=3Dall
# Our build system ignores LDFLAGS for plugins
configureflags: --disable-plugin-auth-pam --disab= le-plugin-down-root
- build: normal
@@ -300,8 +300,8 @@

configureflags: ["--w= ith-openssl-engine=3Dno"]
include:
= - build: asan
- cflags: "-fsanitize=3Daddress -fno-optimize-sibli= ng-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1&= quot;
- ldfl= ags: -fsanitize=3Daddress
+ cflags: "-fsanitize=3Daddress -fno-sanitize-recover= =3Dall -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno= -omit-frame-pointer -g -O1"
+ ldflags: -fsanitize=3Daddress -fno-sanitize-recove= r=3Dall
cc: clang
-= build: normal
cflags: "-O2 -g"

To view, visit change 375. To unsubscribe, or fo= r help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I204b396dea9f22d68e8e091d181= a85ffebde4c17
Gerrit-Change-Number: 375
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--s9KVGJ2xeKI=--