[lldb-dev] Asserts in StringRef::front

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu Oct 6 12:15:51 PDT 2016


I fixed a bug in CommandObject::Execute that cause test-suite crashes when running with an Assert build of llvm (r283479.)

The test was doing:

break modify -c ''

which is the way you unset a condition on a breakpoint.

So the StringRef for that option value was empty, and it appears that you aren't supposed to call "front" on an empty StringRef.  But empty option values are used in a bunch of places in lldb.

Zachary, you might want to go scrub through the Args changes (and anywhere else you might be parsing an empty StringRef) to make sure there aren't other errors of this sort.

And if you aren't running your prep testsuite runs with an Assert build of llvm, it's probably a good idea to do so.

Jim



More information about the lldb-dev mailing list