From 58af4d1fb733c5348b68dd3980f2a230d95400b4 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Fri, 9 Dec 2016 18:57:08 +0200 Subject: Enable clang integer sanitizer and clean up a few warnings. Changed to use simple indexing instead of while (count--) in buf_read()/buf_write(), because the count overflowed from 0 to max on the last iteration. While the unsigned integer overflow is defined and behaviour was correct, making this simple change allowed enabling the sanitizer which might catch true errors elsewhere in the code. --- tests/SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/SConstruct b/tests/SConstruct index f2abe042..ae79f710 100644 --- a/tests/SConstruct +++ b/tests/SConstruct @@ -95,7 +95,7 @@ if not env.GetOption('clean'): # Check if we can use undefined behaviour sanitizer (only with clang) # TODO: Fuzz test triggers the bool sanitizer, figure out whether to # modify the fuzz test or to keep ignoring the check. - extra = '-fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=bool ' + extra = '-fsanitize=undefined,integer -fno-sanitize-recover=undefined,integer -fsanitize-recover=bool ' if 'clang' in env['CC']: if conf.CheckCCFLAGS(extra, linkflags = extra): conf.env.Append(CORECFLAGS = extra) -- cgit 1.2.3-korg