rozniak / xfce-winxp-tc

Windows XP stuff for XFCE
Other
1.11k stars 37 forks source link

Build - enable asan #308

Closed rozniak closed 5 months ago

rozniak commented 5 months ago

After #306 , it would obviously be a good idea to enable asan for the builds to capture these sorts of issues early.

Will need to add the following to the CMake, probably the common CMakeLists

add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)

and add this for checked/debug builds

add_compile_options(-fno-omit-frame-pointer)
rozniak commented 5 months ago

Think this should be for checked builds only...

rozniak commented 5 months ago

Working through some existing issues brought up by ASan

rozniak commented 5 months ago

NTS: notepad save as dialog leaks, unsure why - investigate GTK source

rozniak commented 5 months ago

NTS: libfontconfig leaks so should be suppressed

Useful to test most programs with LSAN_OPTIONS=suppressions=supp.txt <the program>

with supp.txt contents

leak:libfontconfig.so

When looking for specific leaked mem, report addresses with LSAN_OPTIONS=suppressions=supp.txt:report_objects=1 <the program>

rozniak commented 5 months ago

Probably won't have any more time on this for the weekend, will have to continue during the week when I get home.

Few things outstanding:

Think most everything else is sorted for now, though this is still a fair bit of work to undertake.

rozniak commented 5 months ago

I think I'll save the upstream investigations for a separate issue... I have just migrated regsvc to GApplication and it seems all good (probably because the GVariant leaks were fixed earlier).

Remaining issues for GTK/WNCK leaks can be looked at separately. They might just be 'one off' leaks that are intentional by those libraries.