<div dir="ltr"><div dir="ltr"><div dir="ltr">The first error message indicates that the ASan runtime failed to intercept memcpy. The code in question looks like this:<div><br></div><div><div>#define INIT_MEMCPY \</div><div> do { \</div><div> if (PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE) { \</div><div> COMMON_INTERCEPT_FUNCTION(memcpy); \</div><div> } else { \</div><div> ASSIGN_REAL(memcpy, memmove); \</div><div> } \</div><div> CHECK(REAL(memcpy)); \</div><div> } while (false)</div></div><div><br></div><div>If you run with ASAN_OPTIONS=verbosity=3 you will get more information about interception failures. ASan on Windows uses various hotpatching techniques to intercept and override the default application memcpy, but they often fail on different versions of Windows DLLs with novel code patterns in the prologue. It is very fragile and I would love for it to be replaced with something more robust.</div><div><br></div><div>The follow-on CHECK failure is probably not important.</div><div><br></div><div>If you're interested, I'd recommend putting together a bug report. It's worth including the versions of Windows and the Visual C++ runtime that you are using. Either the <a href="https://bugs.llvm.org">https://bugs.llvm.org</a> or <a href="https://github.com/google/sanitizers/">https://github.com/google/sanitizers/</a> are reasonable places for it.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 23, 2019 at 11:13 PM Gaier, Bjoern via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-1952237574361068170WordSection1">
<p class="MsoNormal">Hello everyone,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I heard a lot of good things about clangs "Sanitizer" so I wanted to test the "AddressSanitizer" with clang-cl. I complied LLVM7, Clang and Compiler-rt on my machine, wrote a simple test application and passed "-Xclang -fsanitize=address"
to clang-cl. The linker then complained about undefined references. Because I'm on a Windows7 x64 machine I then linked "clang_rt.asan-x86_64.lib" to my project.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">When I now execute my test application I get the messages:<u></u><u></u></p>
<p class="MsoNormal">==8160==AddressSanitizer CHECK failed: \compiler-rt-7.0.0.src\lib\sanitizer_common\sanitizer_common_interceptors.inc:7265 "((__interception::real_memcpy)) != (0)" (0x0, 0x0)<u></u><u></u></p>
<p class="MsoNormal">==8004==AddressSanitizer CHECK failed: \compiler-rt-7.0.0.src\lib\asan\asan_poisoning.cc:37 "((AddrIsInMem(addr))) != (0)" (0x0, 0x0)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What am I doing wrong?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Kind greetings<u></u><u></u></p>
<p class="MsoNormal">Björn<u></u><u></u></p>
</div>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>