We are using ubsan on Windows with our applications. We just ran into a problem where a DLL links to ubsan and also the main exe that then loads the DLL also links to ubsan. This leads to two observable problems we have seen. Ubsan initializes DbgHelp and if this happens from both places simultaneously it can lead to crashes and similar with the log file - it’ll lead to races when tries to open the log file from both places at the same time.
On Linux ubsan can be linked as a shared library and that would workaround the issues. I am trying to figure out if there is something stopping us from using Ubsan as a DLL on Windows or if it’s just a missing feature at this point.
Has anyone handled a setup like this before or have any pointers?