Hello, I've now completed enabling the undefined sanitizer for gnutls, and may be a good idea to use it for nettle to. The following patch enables running the test suite of nettle under libasan (to detect any invalid memory accesses/writes), and the undefined sanitizer.
I've run a test build, and the libasan build succeeds but the libubsan builds fail: https://gitlab.com/gnutls/nettle/builds/773956 Its complaints are not that critical for the targetted platforms but may be nice not to rely on undefined behavior. regards, Nikos
From ec91a25e8e40ff58b532e2291eeeaece355504ab Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos <[email protected]> Date: Mon, 29 Feb 2016 13:08:36 +0100 Subject: [PATCH] .gitlab-ci.yml: enhance with builds using asan and ubsan This allows running the test suite under address sanitizer and undefined sanitizer. --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99b241e..8d44cbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,3 +17,19 @@ Build and Check (x86): - x86 except: - tags +Build and Check with ubsan: + script: + - ./.bootstrap && + CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" ./configure + --disable-documentation && make -j4 && make check -j4 + tags: + - ubsan + except: + - tags +Build and Check with asan: + script: + - ./.bootstrap && + - CXXFLAGS="-fsanitize=address -g -O2" CFLAGS="-fsanitize=address -g -O2" ./configure --disable-documentation && + make -j4 && make check -j4 + except: + - tags -- 2.5.0
_______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
