https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90312

            Bug ID: 90312
           Summary: Address sanitizer cannot be used with -mabi=ms since
                    r266073
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sbence92 at gmail dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org,
                    marxin at gcc dot gnu.org, mliska at suse dot cz
  Target Milestone: ---
            Target: x86_64-w64-mingw32
             Build: x86_64-w64-mingw32

The fix or PR sanitizer/87930 (r266073) makes it impossible to use
-fsanitize=address on windows which uses -mabi=ms as default.

Currently the mingw releases do not contain libasan (or libusan) and so far my
attempts to include them failed. However there's a mingw based llvm toolchain
(https://github.com/mstorsjo/llvm-mingw) which contains libasan and libusan as
static lib. These can be linked to a dll by the said toolchain and they work
with mingw as drop-in until gcc 8.3.

I guess PR sanitizer/87930 could be fixed instead of forbidden.

It would be awesome to use the asan (and usan) with mingw but that's currently
impossible after r266073 even if we produce the libasan for mingw somehow.

Reply via email to