jenkins: Osmocom_Sanitizer build fails

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
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
fails.

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:

./configure
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:
-O2
-g
-msse3
-msse4.1

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
missing.

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.
See http://git.osmocom.org/libosmocore/commit/?id=a23817622b28cb1969a73ffd36da501eb29b9cd7

I created https://osmocom.org/issues/2330

~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170618/63b39014/attachment.bin>


More information about the OpenBSC mailing list