<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 14, 2016, at 2:32 PM, Kostya Serebryany via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">[Sorry for delay, I was OOO. ]<br class=""></div><div class="">+kuba, who did something related in the past. (<a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=218538" class="">http://llvm.org/viewvc/llvm-project?view=revision&revision=218538</a>)</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>These APIs Kuba added for ASan and TSan are being used by lldb, so you can also take a look at how the debugger part is implemented. </div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">My major concern is the added complexity and code maintenance cost. </div><div class="">You are trying to implement a feature for which I never felt any need, </div><div class="">so for me this sounds like "huge extra complexity for no benefit".</div><div class="">Obviously, since you are working on it, your users need it (or you think they do :).<br class=""></div><div class=""><br class=""></div><div class="">I am not enthusiastic but let's look at the individual patches.</div><div class="">Some thoughts: </div><div class=""> * if something is not asan-specific, put it into sanitizer_common so that we can reuse it in ubsan/tsan/msan. </div><div class=""> * try to avoid any extra memory allocation or system calls while reporting a bug to stderr. </div><div class=""> Keeping the bug reporting machinery reliable is the 1-st priority. </div><div class=""> </div><div class="">--kcc </div><div class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 4, 2016 at 10:09 AM, Filipe Cabecinhas via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi all,<br class="">
<br class="">
As we all know, ASan prints all diagnostics information to stderr. It<br class="">
also has some API to get<br class="">
information about addresses, etc (useful for debugging), which prints<br class="">
information to stderr.<br class="">
<br class="">
These features require a live process, and the ability to call<br class="">
functions in the process. It also<br class="">
forces a user to do multiple target calls to run functions, which<br class="">
might be slow (or impossible, in<br class="">
the case of core dumps). The API functions like __asan_get_report_*()<br class="">
also aren't as useful as they should, since they only work for generic<br class="">
errors.<br class="">
<br class="">
We would like to make it easier to:<br class="">
- Embed an ASan error in a core dump, with all relevant information<br class="">
(basically, it should be<br class="">
possible to implement the printing mechanism with the information<br class="">
added to the core dump, without<br class="">
knowing about ASan internals);<br class="">
- Have a debugger (possible running on another host) be able to get<br class="">
all the information available<br class="">
through ASan API in a structured way.<br class="">
<br class="">
We will be proposing patches to implement this. I'm thinking of doing<br class="">
it piecewise by starting with<br class="">
simple API functions like `__asan_describe_address(void *)`. We'd add<br class="">
a function to populate a<br class="">
struct, and then reimplement __asan_describe_address in terms of that function.<br class="">
<br class="">
For the core dump/minimize number of calls scenario, we'd like to have<br class="">
one single "error<br class="">
description" structure, which we could add to a core dump via system<br class="">
API, or have the debugger read<br class="">
the whole structure once through an ASan API call and then have all<br class="">
the relevant information. Our<br class="">
debugger team would really like to have the same functionality<br class="">
available for live processes and<br class="">
core dumps, since that is a better user experience.<br class="">
<br class="">
In the following weeks, we'll be submitting patches to reify some of<br class="">
the information available in<br class="">
the API and error reports. Please comment on information you'd like to<br class="">
see reified too.<br class="">
<br class="">
Thank you,<br class="">
<br class="">
Filipe<br class="">
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
</blockquote></div><br class=""></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>