MuseScore
MuseScore copied to clipboard
Fix enabling Address Sanitizer on CI
Resolves: #13258
Contains real fixes for some of the reported memory errors, and temporary dirty fixes for the other ones.
Every input on this would be highly appreciated!
I turned on Address Sanitizer for the vtests too. Apparently on Linux, Address Sanitizer also includes Leak Sanitizer, and woah... that's a huge amount of leaks. You can see them here: https://github.com/musescore/MuseScore/actions/runs/3177233016/jobs/5177448025#step:7:1031 (it takes a while for that the huge log is loaded).
I'm going to turn that off for now, because it's really too much to handle right now. So we'll only have Address Sanitizer.
Hopefully we manage to fix the remaining existing errors, so that we can merge this, since it would be quite a nice tool to catch regressions. For example it would have prevented the crash that's fixed by #13594.
This is finally ready! I've found a proper solution for all problems, and also added some compiler warning fixes.