Page MenuHomePhabricator

tests: eldbus: fix heap use after free error detected by address sanitizer

Authored by stefan_schmidt on Aug 27 2019, 6:19 AM.



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/
#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/
#7 0x405d8d in _start (/home/stefan/EFL/efl/build/src/tests/eldbus/eldbus_suite+0x405d8d)

ref T8142

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
stefan_schmidt created this revision.Aug 27 2019, 6:19 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

stefan_schmidt requested review of this revision.Aug 27 2019, 6:19 AM
zmike accepted this revision.Aug 27 2019, 6:29 AM


This revision is now accepted and ready to land.Aug 27 2019, 6:29 AM
This revision was automatically updated to reflect the committed changes.