jenkins: Osmocom_Sanitizer build fails

Neels Hofmeyr nhofmeyr at
Sun Jun 18 14:18:58 UTC 2017

Today I noticed that the Osmocom_Sanitizer build has been broken for a long
time, failing at libosmocore/src/viterbi_sse.c. But that seems like the fault
of the way the Osmocom_Sanitizer builds:

When I build libosmocore with --enable-sanitize, everything works out.  When I
instead build with `make CFLAGS+="..."', some CFLAGS are dropped and the build

The working commandline is:

./configure --enable-sanitize
make V=1
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -fsanitize=address -fsanitize=undefined -Wall -g -O2 -fsanitize=address -fsanitize=undefined -msse3 -msse4.1 -MT viterbi_sse.lo -MD -MP -MF .deps/viterbi_sse.Tpo -c viterbi_sse.c  -fPIC -DPIC -o .libs/viterbi_sse.o

The failing one is:

make CFLAGS+="-fsanitize=address -fsanitize=undefined" V=1
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -fsanitize=address -fsanitize=undefined -Wall -fsanitize=address -fsanitize=undefined -MT viterbi_sse.lo -MD -MP -MF .deps/viterbi_sse.Tpo -c viterbi_sse.c  -fPIC -DPIC -o .libs/viterbi_sse.o

i.e. in the failing build, these cmdline args are missing:

So it seems that the CFLAGS+="stuff" is not working as intended.

The alternative is to build with the ./configure --enable-sanitize, which I
added at some point. But not all libs have this switch, AFAIR.  I have added
the --enable-sanitize configure option to libosmocore, and asked others to
follow up in other repositories in the same fashion. I think this hasn't worked
out everywhere yet.

Does it make sense to refresh the sanitize build effort?: switch the
Osmocom_Sanitizer build to using this configure flag and add it where it is

But I guess we should instead add the sanitize switch to each individual build
script for the various *osmo* build jobs and switch off the Osmocom_Sanitizer
build instead.

I repeat myself, but adding --enable-sanitize is not a lot of effort.

I created

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <>

More information about the OpenBSC mailing list