[Bug sanitizer/90312] Address sanitizer cannot be used with -mabi=ms since r266073

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 2 11:41:00 GMT 2019


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-05-02
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |9.0

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Bence Szabó from comment #0)
> The fix or PR sanitizer/87930 (r266073) makes it impossible to use
> -fsanitize=address on windows which uses -mabi=ms as default.

Hello.

> 
> Currently the mingw releases do not contain libasan (or libusan) and so far
> my attempts to include them failed.

I can help you with that if you want. What are the main blockers of that?

> 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 see. I'm attaching a patch candidate that will error only when default ABI is
different from MS.

> 
> 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.


More information about the Gcc-bugs mailing list