<div dir="ltr">On Thursday, August 13, 2015, Joerg Sonnenberger via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Aug 12, 2015 at 07:38:53PM -0700, Saleem Abdulrasool via llvm-commits wrote:<br>
> > * Have good error messages. Right now most of the errors are just<br>
> > "parse error". We can do a lot better by adding a diagnostic handler.<br>
> > This is in my todo list.<br>
> ><br>
><br>
> Not to put words in Joerg's mouth, but I think that this would go a long<br>
> way to alleviate his concern.  If we can provide concrete messages of<br>
> *what* went wrong, then the tool becomes significantly more invaluable,<br>
> since it can analyse the failure.<br>
<br>
Mostly. Consider a problem I had lately on ARM where the notes where not<br>
correctly aligned. readelf is parsing it for a lot of operations -- and<br>
crashed every time. Providing a good error message is a start for<br>
diagnosing the error. If you see a problem, stop what you are doing<br>
right now and see where you can safely resume parsing. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote><div><br></div><div>This seems reasonable, and I agree that this behavior is preferable.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We do that quite<br>
well in clang, we should try to adopt a similar stance when dealing with<br>
binary formats. There are different options here. For fixed size<br>
records, continuing with the next record is normally OK. For variable<br>
size records, depending on the problem bailing out and dealing with a<br>
different part of the field may be the only option.</blockquote><div><br></div><div>Yeah, basically what I was advocating poorly :).</div><div><br></div><div>Seems like there is mostly consensus around the desired behavior of the tool.  Davide, does this sound reasonable to you?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Joerg<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a>llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote>
</div>