Easy way to run ASAN on mac VCV?

I know if you have an XCode project it’s just one click to turn on Address Sanitizer. Is there an easy way to do it if you make rack/plugins from a standard makefile like most of us do?

Add -fsanitize=address to your plugin Makefile FLAGS and LD_FLAGS.

Then you can either also add FLAGS and LD_FLAGS in the top level Rack Makefile, or you can avoid that by starting rack with the following (your path might vary a bit): DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ./Rack -d

Thanks!!

Just realised you can do this without modifying any files, also works on Ubuntu.

make -j8 EXTRA_FLAGS=-fsanitize=address EXTRA_LDFLAGS=-fsanitize=address

No idea how to do it on Windows.

There is no ASAN implementation on Windows, although Microsoft seems close.