[Bug 202213] bluez trunk tests fail with GCC 9 (or with -fsanitize=address with GCC 9)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=202213

--- Comment #7 from Martin Liška (mliska@xxxxxxx) ---
The test works for me with:

diff --git a/unit/test-sdp.c b/unit/test-sdp.c
index 5a50cbbf1..ebe00571d 100644
--- a/unit/test-sdp.c
+++ b/unit/test-sdp.c
@@ -59,14 +59,14 @@ struct test_data {
 #define raw_pdu(args...) \
        {                                                       \
                .valid = true,                                  \
-               .raw_data = raw_data(args),                     \
+    .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
                .raw_size = sizeof(raw_data(args)),             \
        }

 #define raw_pdu_cont(cont, args...) \
        {                                                       \
                .valid = true,                                  \
-               .raw_data = raw_data(args),                     \
+    .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
                .raw_size = sizeof(raw_data(args)),             \
                .cont_len = cont,                               \
        }
@@ -104,7 +104,7 @@ struct test_data_de {
 #define define_test_de_attr(name, input, exp) \
        do {                                                            \
                static struct test_data_de data;                        \
-               data.input_data = input;                                \
+               data.input_data = g_memdup(input, sizeof (input));             
                \
                data.input_size = sizeof(input);                        \
                data.expected = exp;                                    \
                tester_add("/sdp/DE/ATTR/" name, &data, NULL,           \

thanks for help.

-- 
You are receiving this mail because:
You are the assignee for the bug.



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux