Commit 549112c1 authored by Beniamino Galvani's avatar Beniamino Galvani

merge: branch 'bg/sanitizers'

Fix build with sanitizers, and other memory fixes

https://github.com/NetworkManager/NetworkManager/pull/342
parents 8c3fc3c5 82c74eb4
Pipeline #30216 passed with stages
in 24 minutes and 48 seconds
......@@ -213,6 +213,9 @@ shared_libcsiphash_la_CPPFLAGS = \
$(SANITIZER_LIB_CFLAGS) \
$(NULL)
shared_libcsiphash_la_LDFLAGS = \
$(SANITIZER_LIB_LDFLAGS)
shared_libcsiphash_la_SOURCES = \
shared/c-siphash/src/c-siphash.c \
shared/c-siphash/src/c-siphash.h \
......@@ -232,6 +235,9 @@ shared_libcrbtree_la_CPPFLAGS = \
$(SANITIZER_LIB_CFLAGS) \
$(NULL)
shared_libcrbtree_la_LDFLAGS = \
$(SANITIZER_LIB_LDFLAGS)
shared_libcrbtree_la_SOURCES = \
shared/c-rbtree/src/c-rbtree.c \
shared/c-rbtree/src/c-rbtree.h \
......@@ -259,6 +265,9 @@ shared_libnacd_la_CPPFLAGS = \
-I$(srcdir)/shared/c-rbtree/src \
$(NULL)
shared_libnacd_la_LDFLAGS = \
$(SANITIZER_LIB_LDFLAGS)
shared_libnacd_la_SOURCES = \
shared/n-acd/src/n-acd.c \
shared/n-acd/src/n-acd.h \
......@@ -374,6 +383,11 @@ shared_nm_utils_tests_test_shared_general_CPPFLAGS = \
$(SANITIZER_LIB_CFLAGS) \
$(NULL)
shared_nm_utils_tests_test_shared_general_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS) \
$(SANITIZER_EXEC_LDFLAGS) \
$(NULL)
shared_nm_utils_tests_test_shared_general_LDADD = \
shared/nm-utils/libnm-utils-base.la \
$(GLIB_LIBS) \
......@@ -964,7 +978,7 @@ libnm_core_tests_ldadd = \
$(GLIB_LIBS)
libnm_core_tests_ldflags = \
$(SANITIZER_LIB_LDFLAGS)
$(SANITIZER_EXEC_LDFLAGS)
libnm_core_tests_test_compare_LDADD = $(libnm_core_tests_ldadd)
libnm_core_tests_test_crypto_LDADD = $(libnm_core_tests_ldadd)
......@@ -1387,7 +1401,7 @@ libnm_tests_ldadd = \
$(GLIB_LIBS)
libnm_tests_ldflags = \
$(SANITIZER_LIB_LDFLAGS)
$(SANITIZER_EXEC_LDFLAGS)
libnm_tests_test_general_CPPFLAGS = $(libnm_tests_cppflags)
libnm_tests_test_nm_client_CPPFLAGS = $(libnm_tests_cppflags)
......@@ -1416,6 +1430,10 @@ libnm_tests_test_secret_agent_SOURCES = \
libnm_tests_test_general_LDADD = \
libnm/libnm-utils.la \
$(libnm_tests_ldadd)
libnm_tests_test_general_LDFLAGS = \
$(libnm_tests_ldflags)
libnm_tests_test_nm_client_LDADD = $(libnm_tests_ldadd)
libnm_tests_test_remote_settings_client_LDADD = $(libnm_tests_ldadd)
libnm_tests_test_secret_agent_LDADD = $(libnm_tests_ldadd)
......@@ -3710,6 +3728,10 @@ $(src_tests_test_utils_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
src_tests_test_systemd_CPPFLAGS = \
$(src_libnm_systemd_core_la_cppflags) \
-DNETWORKMANAGER_COMPILATION_TEST
src_tests_test_systemd_LDFLAGS = \
$(SANITIZER_EXEC_LDFLAGS)
src_tests_test_systemd_LDADD = \
src/libnm-systemd-core.la \
shared/systemd/libnm-systemd-shared.la \
......
size: 377
location: clients/tests/test-client.py:856:test_002()/1
location: clients/tests/test-client.py:857:test_002()/1
cmd: $NMCLI d
lang: C
returncode: 0
......@@ -14,7 +14,7 @@ wlan1 wifi unavailable --
<<<
size: 392
location: clients/tests/test-client.py:856:test_002()/2
location: clients/tests/test-client.py:857:test_002()/2
cmd: $NMCLI d
lang: pl_PL.UTF-8
returncode: 0
......@@ -29,7 +29,7 @@ wlan1 wifi niedostępne --
<<<
size: 978
location: clients/tests/test-client.py:858:test_002()/3
location: clients/tests/test-client.py:859:test_002()/3
cmd: $NMCLI -f all d
lang: C
returncode: 0
......@@ -44,7 +44,7 @@ wlan1 wifi unavailable unknown unknown /org/freedesk
<<<
size: 993
location: clients/tests/test-client.py:858:test_002()/4
location: clients/tests/test-client.py:859:test_002()/4
cmd: $NMCLI -f all d
lang: pl_PL.UTF-8
returncode: 0
......@@ -59,7 +59,7 @@ wlan1 wifi niedostępne nieznane nieznane /org/freedes
<<<
size: 739
location: clients/tests/test-client.py:860:test_002()/5
location: clients/tests/test-client.py:861:test_002()/5
cmd: $NMCLI
lang: C
returncode: 0
......@@ -95,7 +95,7 @@ Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
<<<
size: 812
location: clients/tests/test-client.py:860:test_002()/6
location: clients/tests/test-client.py:861:test_002()/6
cmd: $NMCLI
lang: pl_PL.UTF-8
returncode: 0
......@@ -133,7 +133,7 @@ o użyciu.
<<<
size: 1250
location: clients/tests/test-client.py:862:test_002()/7
location: clients/tests/test-client.py:863:test_002()/7
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: C
returncode: 0
......@@ -166,7 +166,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1287
location: clients/tests/test-client.py:862:test_002()/8
location: clients/tests/test-client.py:863:test_002()/8
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -199,7 +199,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1704
location: clients/tests/test-client.py:863:test_002()/9
location: clients/tests/test-client.py:864:test_002()/9
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: C
returncode: 0
......@@ -238,7 +238,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1749
location: clients/tests/test-client.py:863:test_002()/10
location: clients/tests/test-client.py:864:test_002()/10
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -277,7 +277,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 581
location: clients/tests/test-client.py:864:test_002()/11
location: clients/tests/test-client.py:865:test_002()/11
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: C
returncode: 0
......@@ -310,7 +310,7 @@ AP[3].SECURITY:WPA1 WPA2
<<<
size: 618
location: clients/tests/test-client.py:864:test_002()/12
location: clients/tests/test-client.py:865:test_002()/12
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -343,7 +343,7 @@ AP[3].SECURITY:WPA1 WPA2
<<<
size: 455
location: clients/tests/test-client.py:865:test_002()/13
location: clients/tests/test-client.py:866:test_002()/13
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: C
returncode: 0
......@@ -356,7 +356,7 @@ AP[3] wlan0-ap-2 Infra 1 54 Mbit/s 34 ** WPA1 WPA2
<<<
size: 499
location: clients/tests/test-client.py:865:test_002()/14
location: clients/tests/test-client.py:866:test_002()/14
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -369,7 +369,7 @@ AP[3] wlan0-ap-2 Infrastruktura 1 54 Mb/s 34 ** WPA1 W
<<<
size: 614
location: clients/tests/test-client.py:866:test_002()/15
location: clients/tests/test-client.py:867:test_002()/15
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: C
returncode: 0
......@@ -386,7 +386,7 @@ AP[3] wlan0-ap-2 Infra 1 54 Mbit/s 34 ** WPA1 WPA2
<<<
size: 694
location: clients/tests/test-client.py:866:test_002()/16
location: clients/tests/test-client.py:867:test_002()/16
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -403,7 +403,7 @@ AP[3] wlan0-ap-2 Infrastruktura 1 54 Mb/s 34 ** WPA1 W
<<<
size: 309
location: clients/tests/test-client.py:867:test_002()/17
location: clients/tests/test-client.py:868:test_002()/17
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: C
returncode: 0
......@@ -415,7 +415,7 @@ AP[3]: :wlan0-ap-2:Infra:1:54 Mbit/s:34:** :WPA1 WPA2
<<<
size: 346
location: clients/tests/test-client.py:867:test_002()/18
location: clients/tests/test-client.py:868:test_002()/18
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......@@ -427,7 +427,7 @@ AP[3]: :wlan0-ap-2:Infrastruktura:1:54 Mb/s:34:** :WPA1 WPA2
<<<
size: 1973
location: clients/tests/test-client.py:869:test_002()/19
location: clients/tests/test-client.py:870:test_002()/19
cmd: $NMCLI -f ALL d wifi
lang: C
returncode: 0
......@@ -445,7 +445,7 @@ NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA
<<<
size: 2041
location: clients/tests/test-client.py:869:test_002()/20
location: clients/tests/test-client.py:870:test_002()/20
cmd: $NMCLI -f ALL d wifi
lang: pl_PL.UTF-8
returncode: 0
......@@ -463,7 +463,7 @@ NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA
<<<
size: 246
location: clients/tests/test-client.py:871:test_002()/21
location: clients/tests/test-client.py:872:test_002()/21
cmd: $NMCLI c
lang: C
returncode: 0
......@@ -474,7 +474,7 @@ con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
size: 256
location: clients/tests/test-client.py:871:test_002()/22
location: clients/tests/test-client.py:872:test_002()/22
cmd: $NMCLI c
lang: pl_PL.UTF-8
returncode: 0
......@@ -485,7 +485,7 @@ con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
size: 1224
location: clients/tests/test-client.py:873:test_002()/23
location: clients/tests/test-client.py:874:test_002()/23
cmd: $NMCLI c s con-1
lang: C
returncode: 0
......@@ -517,7 +517,7 @@ connection.llmnr: -1 (default)
<<<
size: 1236
location: clients/tests/test-client.py:873:test_002()/24
location: clients/tests/test-client.py:874:test_002()/24
cmd: $NMCLI c s con-1
lang: pl_PL.UTF-8
returncode: 0
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -589,6 +589,7 @@ class TestNmcli(NmTestBase):
env['LIBNM_USE_SESSION_BUS'] = '1'
env['LIBNM_USE_NO_UDEV'] = '1'
env['TERM'] = 'linux'
env['ASAN_OPTIONS'] = 'detect_leaks=0'
env['XDG_CONFIG_HOME'] = PathConfiguration.srcdir()
if fatal_warnings is _DEFAULT_ARG or fatal_warnings:
env['G_DEBUG'] = 'fatal-warnings'
......
......@@ -8075,7 +8075,7 @@ _do_test_unescape_spaces (const char *in, const char *out)
gboolean append = nmtst_get_rand_bool ();
char ch = nmtst_rand_select (' ', '\t');
if (append && out[strlen (out) - 1] == '\\')
if (append && out[0] && out[strlen (out) - 1] == '\\')
append = FALSE;
g_string_insert_c (str_in, append ? -1 : 0, ch);
......
......@@ -9948,7 +9948,7 @@ nm_device_activate_stage3_ip6_start (NMDevice *self)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMActStageReturn ret;
NMDeviceStateReason failure_reason = NM_DEVICE_STATE_REASON_NONE;
NMIP6Config *ip6_config = NULL;
gs_unref_object NMIP6Config *ip6_config = NULL;
g_assert (priv->ip_state_6 == NM_DEVICE_IP_STATE_WAIT);
......
......@@ -2588,7 +2588,7 @@ static void
nm_policy_init (NMPolicy *self)
{
NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self);
const char *hostname_mode;
gs_free char *hostname_mode = NULL;
c_list_init (&priv->pending_activation_checks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment