[systemd-devel] test-selinux fails under the address sanitizer

Thomas H.P. Andersen phomes at gmail.com
Tue May 3 18:44:40 UTC 2016


Hi,

I was wondering if anybody else had looked into this already. When building
with --enable-address-sanitizer I get the following error in test-selinux.
While trying the create a reduced test case I found that the problem comes
and goes when I remove logging either before or after the call where if
fails in src/teset/test-selinux.c. As far as I can tell the input to
log_internalv looks correct. So I suspect this could be a bug in libasan
perhaps? Did any one else ever look at this?

$ ./test-selinux
============ test_testing ==========
mac_selinux_use → no
mac_selinux_have → no
mac_selinux_use → no
mac_selinux_have → no
============ test_loading ==========
mac_selinux_init → 0 (No such file or directory) 0.00s
============ test_misc ==========
ASAN:DEADLYSIGNAL
=================================================================
==19627==ERROR: AddressSanitizer: SEGV on unknown address 0x000041b58ab3
(pc 0x7fc021669f12 bp 0x7ffdd8e50810 sp 0x7ffdd8e4ff38 T0)
    #0 0x7fc021669f11  (/lib64/libasan.so.3+0xdef11)
    #1 0x7fc021619c5f  (/lib64/libasan.so.3+0x8ec5f)
    #2 0x7fc02161bd7d in __interceptor_vsnprintf
(/lib64/libasan.so.3+0x90d7d)
    #3 0x558369c50106 in log_internalv src/basic/log.c:677
    #4 0x558369c50303 in log_internal src/basic/log.c:694
    #5 0x558369c47113 in test_misc src/test/test-selinux.c:81
    #6 0x558369c47574 in main src/test/test-selinux.c:117
    #7 0x7fc020d9a720 in __libc_start_main (/lib64/libc.so.6+0x20720)
    #8 0x558369c467c8 in _start (/home/phomes/systemd/test-selinux+0x267c8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libasan.so.3+0xdef11)
==19627==ABORTING
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160503/dc395658/attachment.html>


More information about the systemd-devel mailing list