stb icon indicating copy to clipboard operation
stb copied to clipboard

Avoid address sanitizer on MSVC

Open tim-rex opened this issue 4 months ago • 2 comments

Extending on #393 Since MSVC now supports address sanitizer, it appears to be throwing the same issues as other platforms

This PR adds compiler checks and appropriate declspecs for MSVC

Note that _declspec for MSVC must appear before the storage specifier, hence the additional set of STBSP__PUBLICDEF's There's probably a cleaner way to structure that

tim-rex avatar Mar 15 '24 11:03 tim-rex

See also #1477 as well as #1350.

Manuzor avatar Mar 15 '24 13:03 Manuzor

You might add UBSAN as well, since it also flags the tricks used in sprintf library. __attribute__((no_sanitize("undefined")))

Condzi avatar Mar 20 '24 13:03 Condzi