Instead of creating a char pointer to hold the stop reason description,
the reason is stored in a std::string.
Details
Details
- Reviewers
friss JDevlieghere labath
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/API/SBThread.cpp | ||
---|---|---|
361–363 | I don't think this is generally safe. Creating a std::string from a nullptr is undefined (and the previous test makes it look like this pointer could be null). |
lldb/source/API/SBThread.cpp | ||
---|---|---|
361–363 | GetStopDescription now returns a std::string, so it should be fine here? |
lldb/source/API/SBThread.cpp | ||
---|---|---|
361–363 | nvm, I didn't see the variable got assigned again |
This looks like some "optimization" to not have to compute the strlen below if the string is known. I dont't think we need this anymore with the description being a string?