As seen in a crash report, the C-string returned for the directory component of target_file can null. It should not be assigned to std::string directly as this is undefined behavior.
Details
Details
Diff Detail
Diff Detail
- Repository
- rLLDB LLDB
Event Timeline
Comment Actions
Might be clearer to do:
if (target_file.GetDirectory().IsEmpty()) { error... } std::string directory = ...
Avoids the extra variable and also adds the check for "", which I don't think we want to add to sys.path either.