[mythtv] mythtv and AddressSanitizer?
mythtv at hbuus.com
Fri Oct 12 01:24:14 UTC 2018
On October 11, 2018 7:18:51 PM EDT, Mark Spieth <mark at digivation.com.au> wrote:
>On 12/10/18 09:50, Peter Bennett wrote:
>> On 10/11/2018 06:36 PM, faginbagin wrote:
>>> Has anyone tried to enable AddressSanitizer compilation of mythtv?
>>> Would the right approach be to add -fsanitize=address to CFLAGS
>>> I see configure has been modified to handle some ffmpeg
>>> options. Will that cause conflicts?
>>> Any other gotchas?
>>> I ask because I'm getting core dumps on a 32 bit laptop and the core
>>> dumps aren't helpful. My plan is to install a 32 bit distro on a 64
>>> machine and test there.
>> I don't know about address sanitizer, but I may be able top help with
>> the core dumps.
>There shouldn't be any problem. May cause a slight performance hit but
>thats all. Normally I would only do this in unit tests but if it helps
>catch issues then do it. I have not tried this so YMMV.
>Also ulimit -c unlimited to dump core on segfault and then post
>or even gcore to dump the core of a running process to look for
>You probably know these tricks.
>If the coredumps arent helpful -fsanitize=address may also not help
>since the stack is probably corrupted.
>mythtv-dev mailing list
>mythtv-dev at mythtv.org
>MythTV Forums: https://forum.mythtv.org
The documentation says ASan can detect stack buffer overflow, so if it is stack corruption, ASan might catch it? I haven't used it before now. I'm hopeful it's more useful than valgrind ever was, especially in detecting bugs in playback code.
More information about the mythtv-dev