[pulseaudio-discuss] RAOP2 patch testing result

Alexander E. Patrakov patrakov at gmail.com
Sun Jan 18 21:39:05 PST 2015


19.01.2015 10:24, Arun Raghavan wrote:
> On 19 January 2015 at 10:31, Alexander E. Patrakov <patrakov at gmail.com> wrote:
>> 19.01.2015 05:33, Hajime Fujita wrote:
> [...]
>>> Also, here's how I launched valgrind. If more detailed options are
>>> necessary please let me know.
>>>    $ valgrind --leak-check=yes ./src/.libs/pulseaudio ...
>>
>>
>> Well, that differs from the way I tried that:
>>
>> valgrind --trace-children=yes ./src/pulseaudio
>>
>> The difference is because our intentions were different: you were focusing
>> on finding memory leaks, while I was searching for uninitialized variables
>> and use-after-free errors. And, I was trying to make sure that the
>> just-compiled libraries are used, and the libtool-generated bash wrapper
>> knows best how to do that.
>>
>> Of course, we can combine our flags, and replace --leak-check=yes with
>> --leak-check=full.
> You could also use this to make sure the libs are picked up from the
> build directory:
>
> libtool --mode=execute valgrind --leak-check=full --trace-children=yes
> ./src/pulseaudio

Thanks for the tip.

Anyway, here is what I get with the portable version of libressl 
(installed into a separate prefix in order to avoid conflicts with the 
system-installed openssl, and added to PKG_CONFIG_PATH).

On connection:

==6892== Use of uninitialised value of size 8
==6892==    at 0x223831FA: pa_raop_base64_encode (raop-util.c:117)
==6892==    by 0x223857A7: rtsp_auth_cb (raop-client.c:1208)
==6892==    by 0x22178E57: on_connection (rtsp_client.c:342)
==6892==    by 0x5D75DC5: do_call (socket-client.c:161)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==
==6892== Use of uninitialised value of size 8
==6892==    at 0x22383201: pa_raop_base64_encode (raop-util.c:118)
==6892==    by 0x223857A7: rtsp_auth_cb (raop-client.c:1208)
==6892==    by 0x22178E57: on_connection (rtsp_client.c:342)
==6892==    by 0x5D75DC5: do_call (socket-client.c:161)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==
==6892== Use of uninitialised value of size 8
==6892==    at 0x22383215: pa_raop_base64_encode (raop-util.c:120)
==6892==    by 0x223857A7: rtsp_auth_cb (raop-client.c:1208)
==6892==    by 0x22178E57: on_connection (rtsp_client.c:342)
==6892==    by 0x5D75DC5: do_call (socket-client.c:161)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==
==6892== Use of uninitialised value of size 8
==6892==    at 0x2238321C: pa_raop_base64_encode (raop-util.c:119)
==6892==    by 0x223857A7: rtsp_auth_cb (raop-client.c:1208)
==6892==    by 0x22178E57: on_connection (rtsp_client.c:342)
==6892==    by 0x5D75DC5: do_call (socket-client.c:161)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==
==6892== Invalid write of size 1
==6892==    at 0x22179316: line_callback (rtsp_client.c:241)
==6892==    by 0x5D60D26: scan_for_lines (ioline.c:271)
==6892==    by 0x5D60D26: do_read (ioline.c:339)
==6892==    by 0x5D60D26: do_work (ioline.c:388)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==  Address 0x1baa09f8 is 72 bytes inside a block of size 152 free'd
==6892==    at 0x4C2A1AC: free (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6892==    by 0x51039BE: pa_xfree (xmalloc.c:131)
==6892==    by 0x2238571B: rtsp_auth_cb (raop-client.c:1305)
==6892==    by 0x22179315: headers_read (rtsp_client.c:171)
==6892==    by 0x22179315: line_callback (rtsp_client.c:240)
==6892==    by 0x5D60D26: scan_for_lines (ioline.c:271)
==6892==    by 0x5D60D26: do_read (ioline.c:339)
==6892==    by 0x5D60D26: do_work (ioline.c:388)
==6892==    by 0x50EF183: dispatch_pollfds (mainloop.c:657)
==6892==    by 0x50EF183: pa_mainloop_dispatch (mainloop.c:900)
==6892==    by 0x50EF559: pa_mainloop_iterate (mainloop.c:931)
==6892==    by 0x50EF5FF: pa_mainloop_run (mainloop.c:946)
==6892==    by 0x406DE5: main (main.c:1136)
==6892==

On starting playback with mpv: nothing! At this point, I'd seriously 
suggest, as a future project (after merging), evaluation of alternatives 
to OpenSSL as an RSA crypto engine in the RAOP sink.

-- 
Alexander E. Patrakov


More information about the pulseaudio-discuss mailing list