<div dir="ltr">Hi <span class="gmail-vN gmail-vP gmail-a3q">Karl</span>,<br><br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-4331768133316407245gmail-">>> I believe that the AddressSanitizer should normally stop with a non-zero error code right after the first error.<br>
<br>
</span>I have many tests within each executable test application, forcing the application to exit on the first error is not optimal since it means I cannot get an overview of all the issues and triage/fix them in logical order. Instead I have to test/fix/retest every time<br></blockquote><div><br><br></div><div>That's by design and isn't to do with how CMake integrates asan; i.e. it's just how asan works.  The idea being that once you hit a memory corruption then any further results can't be relied on.  From the asan documentation: <a href="http://clang.llvm.org/docs/AddressSanitizer.html" target="_blank">http://clang.llvm.org/docs/<wbr>AddressSanitizer.html</a><br><div style="margin-left:40px"><br>"If a bug is detected, the program will print an error message to stderr and
exit with a non-zero exit code. AddressSanitizer exits on the first detected error.
This is by design:<br></div><div style="margin-left:40px"><div style="margin-left:40px"><ul><li>This approach allows AddressSanitizer to produce faster and smaller generated code
(both by ~5%).</li><li>Fixing bugs becomes unavoidable. AddressSanitizer does not produce
false alarms. Once a memory corruption occurs, the program is in an inconsistent
state, which could lead to confusing results and potentially misleading
subsequent reports.</li></ul></div></div><div style="margin-left:40px">"</div><br></div><div>- Chuck<br></div><div><br><br></div></div></div></div></div>