Address sanitizer alerts

I’ve had issues with Address Sanitizer alerts. One in particular is in template <class Pixel> forcedinline void set (const Pixel& src) noexcept

To check whether it was my code or not, I recompiled Projucer (MSVS) and got Address Sanitizer alerts in a number of locations in the application, including the same set method. I think this needs some evaluation by the development team.

Thanks.

Which version of MSVC are you using? Are you doing anything in particular after opening Projucer in order to trigger issues? With the latest JUCE develop, and VS 16.9.3, I don’t see any warnings when running the Projucer after building it in x64 Debug mode with Address Sanitizer.

That was 6.0.8 in debug VS 16.9.3.

I’ve now built the latest development version (latest commit “Projucer: Generate consistent Xcode projects when saving on Windows” 060f96). All Projucer does is open my project (which it does by default). I don’t click anywhere on the Projucer window. With the latest development version, it still throws lots of ASan errors. See: Projucer.txt (560.4 KB).

Could you double-check that you’ve enabled Asan for debug build? I’ve made the mistake of only enabling it for the release build (the VS interface can mislead you).

Thanks

I think these can be safely ignored:

The AddressSanitizer runtime on x64 Windows, makes use of an on-demand mapping scheme which uses an exception handler to map shadow memory. This is present in the open source version and our Visual Studio provided version currently. When debugging, these exceptions will appear as first-chance access violation exceptions with code 0xC0000005. There will be a significant number of them, but these first-chance exceptions can be safely ignored or disabled.

If Address Sanitizer encounters a real issue, it should print a detailed diagnostic message to the output window. I don’t see anything like that in the output you posted.