summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-08-22 11:56:11 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2019-08-29 09:41:53 +0200
commit04e3eff845f1336ae75e1248c043dfb697fcfcf5 (patch)
tree61d9b4f2a2141b6532b4c9633f318cfc78307be1 /src/tests
parentd445e5240b03ddf659b3c16c74d982956a2a7b67 (diff)
tests: eldbus: fix heap use after free error detected by address sanitizer
Using the just unref'ed message in the call next line is not going to end well. ==26321==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000001210 at pc 0x7fc456fd37f5 bp 0x7fff37a00a50 sp 0x7fff37a00a40 READ of size 4 at 0x603000001210 thread T0 #0 0x7fc456fd37f4 in eldbus_message_path_get ../src/lib/eldbus/eldbus_message.c:193 #1 0x42f6ab in utc_eldbus_message_ref_unref_p ../src/tests/eldbus/eldbus_test_eldbus_message.c:877 #2 0x7fc456a27744 in srunner_run_tagged (/lib64/libcheck.so.0+0x6744) #3 0x406a01 in _efl_suite_run_end ../src/tests/eldbus/../efl_check.h:282 #4 0x407357 in _efl_suite_build_and_run ../src/tests/eldbus/../efl_check.h:403 #5 0x407925 in main ../src/tests/eldbus/eldbus_suite.c:49 #6 0x7fc45685df32 in __libc_start_main (/lib64/libc.so.6+0x23f32) #7 0x405d8d in _start (/home/stefan/EFL/efl/build/src/tests/eldbus/eldbus_suite+0x405d8d) ref T8142 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9755
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_message.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tests/eldbus/eldbus_test_eldbus_message.c b/src/tests/eldbus/eldbus_test_eldbus_message.c
index ebba03ba8f..4a739673ce 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_message.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_message.c
@@ -874,7 +874,6 @@ EFL_START_TEST(utc_eldbus_message_ref_unref_p)
874 ck_assert_msg(strcmp(path, path_msg) == 0, "%s != %s", path, path_msg); 874 ck_assert_msg(strcmp(path, path_msg) == 0, "%s != %s", path, path_msg);
875 875
876 eldbus_message_unref(msg); 876 eldbus_message_unref(msg);
877 ck_assert_ptr_eq(NULL, eldbus_message_path_get(msg));
878 877
879 eldbus_connection_unref(conn); 878 eldbus_connection_unref(conn);
880} 879}