<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 9:47 AM, Eugene Kosov <span dir="ltr"><<a href="mailto:claprix@yandex.ru" target="_blank">claprix@yandex.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
Here is the description of a crash <a href="http://lists.llvm.org/pipermail/llvm-dev/2015-November/092429.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2015-November/092429.html</a><br>
<br>
I thinks its testable. Option::ArgStr, Option::HelpStr, Option::ValueStr must not be nullptr. We could make them private and put assertions in setter function. And test it. StringRef can not be created from nullptr string.<br></blockquote><div><br></div><div>Ah, so it's a matter of the current code observes a null/value initialized const char* whereas the new code will observe a default constructed StringRef which represents the empty string, not null?<br><br>Could you include a test case in your patch? It's helpful to have test coverage in LLVM for LLVM features that our users (including in-project uses in places like Clang and LLDB) depend on.<br><br>I'm not quite following if/why this is a valid state (or whether changing to StringRef is just working around a situation and demoting a crash to some other unexpected but non-crashy behavior), though - some more detail might be helpful, but I'm not sure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
16.11.2015, 20:38, "David Blaikie" <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>>:<br>
<div><div class="h5">> What's the actual bug in LLDB's usage & how does this address it? Is it testable in LLVM? (unit tests?)<br>
><br>
> On Mon, Nov 16, 2015 at 9:26 AM, Eugene via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> kevgs created this revision.<br>
>> kevgs added a reviewer: llvm-commits.<br>
>> kevgs added a subscriber: llvm-commits.<br>
>> kevgs set the repository for this revision to rL LLVM.<br>
>><br>
>> Description: <a href="http://lists.llvm.org/pipermail/llvm-dev/2015-November/092429.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2015-November/092429.html</a><br>
>><br>
>> Repository:<br>
>>   rL LLVM<br>
>><br>
>> <a href="http://reviews.llvm.org/D14711" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14711</a><br>
>><br>
>> Files:<br>
>>   include/llvm/Support/CommandLine.h<br>
>>   lib/Support/CommandLine.cpp<br>
>>   unittests/Support/CommandLineTest.cpp<br>
>>   utils/FileCheck/FileCheck.cpp<br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div>--<br>
Eugene<br>
</blockquote></div><br></div></div>