[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-15 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB354145: Fix potential UB when target_file directory is null (authored by stefan.graenitz, committed by ). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D57964?vs=186

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-14 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. This revision is now accepted and ready to land. That code seems amazingly good to me ;-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57964/new/ https://reviews.llvm.org/D57964 ___

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-14 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz added a comment. Herald added a subscriber: jdoerfert. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57964/new/ https://reviews.llvm.org/D57964 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-11 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz updated this revision to Diff 186224. sgraenitz added a comment. Polish && error out also on empty string CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57964/new/ https://reviews.llvm.org/D57964 Files: source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp In

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-08 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. 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. CHANGES SINCE LAST ACTION https://

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-08 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz updated this revision to Diff 186002. sgraenitz added a comment. Remove useless newline CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57964/new/ https://reviews.llvm.org/D57964 Files: source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Index: source/Plugin

[Lldb-commits] [PATCH] D57964: Fix potential UB when target_file directory is null

2019-02-08 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz created this revision. sgraenitz added a reviewer: jingham. 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. https://reviews.llvm.org/D57964 File