For some unknown reason, using size=0 instead of 1 makes LeakSanitizer
report a leak when calling osmo-hnbgw --vty-ref-xml:
"""
==19857==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f083b4d0d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
#1 0x7f083a8e5661 in talloc_named_const (/usr/lib/x86_64-linux-gnu/libtalloc.so.2+0x6661)
"""
It seems iu_client.c is already using size=1.
Change-Id: I383653c981e68a053babd33dee1f0df8731752b0
This global variable is already defined in iu_client.c provided by
libosmo-ranap (and used by libasn1c).
Fixes ASan warning at starutp.
Change-Id: I7dbae83ce0dc4ac25dc10879e223280414f7b561
Let's disable category here since we don't care about its formatting here.
In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.
Change-Id: Ia633cae0a26f294e276b431a82256abb1b57ebba
Related: OS#5034
The related compiler warnings were overlooked as due to the
asn1c-generated code there always are tons of warnings printed compiling
this project :(
Change-Id: I40b1265ba696501cc72e674f3ef4146c47aacf1b
So far we don't really have any way of matching a given log message
to a specific hNB. Let's use the newly-introduced LOGHNB() macro.
Change-Id: Ia16eed4ca5e9ef231259e94c65105f7586f366bc
we unconditionally depend on this header file, yet nothing
in configure.ac ensures its presence. Building on a clean
Debian 10 with all existing dependencies installed passes
configure but fails at compilation time.
Change-Id: I0a4407ef6ee512ad5ea8775d90acfe1c4fa67cd0
So far we don't really have any way of matching a given log message
to a specific hNB. Let's introduce a new log macro, together with
a configuration directive to select whether the hNB-ID or the
UMTS CellID shall be used.
Change-Id: I6113925216c6f88add2c6d27bdf47ccbb017f293
"127.0.0.1" is changed to "localhost" to let local NSS decide whether to
use IPv4 or IPv6. In newish systems, IPv6 ::1 will be selected since
IPv6 takes precedence over IPv4.
Similarly, the default source addr needs to be changed from NULL to "localhost"
since for some yet unknwon reason, getaddrinfo(AF_UNSPEC, NULL) returns
first IPv4 "0.0.0.0" and later "::", which is inconsistent with
getaddrinfo("localhost") result, resulting in src=IPv4(0.0.0.0) and
dst=IPv6(::1), which is incompatible and will fail. In any case, since
the default remote address is a local one and it's the client side,
there's no real logical change since the kernel would anyway should have
taken a local address anyway.
Change-Id: I3c07e6aa0c87b752c9ea22eb4936f6993de6571f
Let's add the type name whose encoding failed to give us some kind
of a clue what's happening in those situations.
Change-Id: I802677ba7164a4d3382d4bc00f5e1c7ab7067d89
Remove OpenSUSE bug report link, set version to @VERSION@, make it build
with CentOS 8 etc.
Related: OS#4550
Change-Id: Ibec1a22952ecfb0578bb4611e65ad819f5984fd8
With new gcc 10.1.0, tests failed at runtime when built with ASAN
enabled, since some global variables where defined multiple times.
See OS#4556 for a sample Asan error.
Fixes: OS#4556
Change-Id: I12a667ea8a9f16404c13c9218b246d2e3acfe3e8
The hnbgw application uses LOGL_DEBUG for all its log categories. This
is way to verbose, lets set LOGL_NOTICE as default loglevel instead.
Change-Id: If3dbed88307814764bab9e7f1821e1dc0d8be43b
Related: OS#2577
As pointed out at https://github.com/libexpat/libexpat/issues/312
libtool does not play nice with clang sanitizer builds at all.
For those builds LD shoud be set to clang too (and LDFLAGS needs the
sanitizer flags as well), because the clang compiler driver knows how
linking to the sanitizer libs works, but then at a later stage libtool
fails to actually produce the shared libraries and the build fails. This
is fixed by this patch.
Addtionally LD_LIBRARY_PATH has no effect on conftest runs during
configure time, so the rpath needs to be set to the asan library path to
ensure the configure run does not fail due to a missing asan library,
i.e.:
SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan'
export CC=clang-10
ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`)
export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS"
Change-Id: I74cdca5c8bd5a32b6fb05906280cc1cdd64e9369
Caught by compiler:
test-ranap.c:54:30: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘RANAP_MaxBitrate_t’ {aka ‘long int’} [-Wformat=]
test-ranap.c:78:30: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘RANAP_CauseMisc_t’ {aka ‘long int’} [-Wformat=]
Change-Id: Icc4e81beaa35e13aea3adfed983016c78b730061
Catched by compiler:
hnb-test-ranap.c:76:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘RANAP_CN_DomainIndicator_t’ {aka ‘long int’} [-Wformat=]
Change-Id: Ie4cd6a36fd0e9a871a1815d600e8a321a3d2a208