Split up into separate modules to avoid the pain with cross-defines from C and C++. Move to c++_static STL. It's the recommended way since a while back and fixes some build issues as well.
Set the SANITIZER=address environment variable. Debug mode isn't required but helps.