I'm working from master and using instrumented builds. Building on Ubuntu 18.04 with UBsan:
libtool: compile: gcc -I. -DSRCDIR=. -DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover -pthread -c daemon/remote.c -fPIC -DPIC -o .libs/remote.o
...
daemon/remote.c: In function ‘do_stats’:
daemon/remote.c:965:38: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
snprintf(nm, sizeof(nm), "OPCODE%d", i);
^
In file included from /usr/include/stdio.h:862:0,
from ./config.h:1022,
from daemon/remote.c:45:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 8 and 17 bytes into a destination of size 16
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ git clone https://github.com/NLnetLabs/unbound.git
$ cd unbound
$ export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover"
$ ./make-master.sh
...
$ make test
...
Hi Everyone,
I'm working from master and using instrumented builds. Building on Ubuntu 18.04 with UBsan:
You can setup the test rig by exporting
CFLAGSwith UBsan enabled: