From: "plaisthos (Code Review)" Date: Wed, 18 Oct 2023 17:21:43 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="OH3g6y/LPJ8="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Add undefined and abort on error to clang sanaitize builds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: openvpn-devel --OH3g6y/LPJ8= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/375?usp=3Demail to review the following change. Change subject: Add undefined and abort on error to clang sanaitize builds ...................................................................... Add undefined and abort on error to clang sanaitize 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 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 --- M .github/workflows/build.yaml 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/375/1 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=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: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --OH3g6y/LPJ8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

Vi= ew Change

Add undefined and abort on error to clang sanaitize builds
The -fno-sanitize-recover=3Dall flag ensures that for all errors we ac= tually
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 mo= re bugs.

For libreSSL we do not add the udefined behaviour as we hav= e (even with the
latest LibreSSL version) an undefined behaviour in Libr= eSSL itself.

Change-Id: I204b396dea9f22d68e8e091d181a85ffebde4c17---
M .github/workflows/build.yaml
1 file changed, 5 insertions(+), = 5 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn re=
fs/changes/75/375/1
diff --git a/.github/workflows/build.yaml b/.gi=
thub/workflows/build.yaml
index 58fbc29..2a25582 100644
--- a/.github/workflows/build.yaml
+++ b/.gith= ub/workflows/build.yaml
@@ -186,7 +186,7 @@
- name: autoconf

run: autoreconf -fvi
- name: configure
- run: CFLAGS=3D"-fsanitize=3Daddress -fno-omit-f= rame-pointer -O2" CC=3Dclang ./configure --with-crypto-library=3D${{ma= trix.ssllib}}
+ = run: CFLAGS=3D"-fsanitize=3Daddress,undefined -fno-sanitize-recover= =3Dall -fno-omit-frame-pointer -O2" CC=3Dclang ./configure --with-cry= pto-library=3D${{matrix.ssllib}}
- name: make all
run: make -j3
- name: make ch= eck
@@ -201,8 +201,8 @@
os: [macos= -11, macos-12, macos-13]
include:
= - build: asan
- ldflags: -= fsanitize=3Daddress
+= cflags: "-fsanitize=3Daddress,undefined -fno-sanitize-reco= ver=3Dall -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -= fno-omit-frame-pointer -g -O1"
+ ldflags: -fsanitize=3Daddress,undefined -fno-sa= nitize-recover=3Dall
# Our build system ignor= es LDFLAGS for plugins
configureflags: --disab= le-plugin-auth-pam --disable-plugin-down-root
-= build: normal
@@ -300,8 +300,8 @@
= configureflags: ["--with-openssl-engine=3Dno"]
= include:
- build: asan
- cflags: "-fsanitize=3D= address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno= -omit-frame-pointer -g -O1"
- ldflags: -fsanitize=3Daddress
+ cflags: "-fsanitize=3Dad= dress -fno-sanitize-recover=3Dall -fno-optimize-sibling-calls -fsanitize-a= ddress-use-after-scope -fno-omit-frame-pointer -g -O1"
+ ldflags: -fsanitize=3Da= ddress -fno-sanitize-recover=3Dall

cc: clang
- build: normal
cfla= gs: "-O2 -g"

To view, visit <= a href=3D"http://gerrit.openvpn.net/c/openvpn/+/375?usp=3Demail">change 375= . To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I204b396dea9f22d68e8e091d181= a85ffebde4c17
Gerrit-Change-Number: 375
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--OH3g6y/LPJ8=--