This is an archive of the discontinued LLVM Phabricator instance.

fix lldb crash by changing const char * with StringRef
ClosedPublic

Authored by kevgs on Nov 16 2015, 9:26 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

kevgs updated this revision to Diff 40301.Nov 16 2015, 9:26 AM
kevgs retitled this revision from to fix lldb crash by changing const char * with StringRef.
kevgs updated this object.
kevgs added a reviewer: llvm-commits.
kevgs set the repository for this revision to rL LLVM.
kevgs added a subscriber: llvm-commits.

What's the actual bug in LLDB's usage & how does this address it? Is it
testable in LLVM? (unit tests?)

kevgs added a subscriber: kevgs.Nov 16 2015, 9:47 AM

Hello.

Here is the description of a crash http://lists.llvm.org/pipermail/llvm-dev/2015-November/092429.html

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.

16.11.2015, 20:38, "David Blaikie" <dblaikie@gmail.com>:

What's the actual bug in LLDB's usage & how does this address it? Is it testable in LLVM? (unit tests?)

This revision was automatically updated to reflect the committed changes.