[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Committed as 302225. I've fixed the indentation in your test, and added a couple of decorators to match other pexpect tests. Thanks for the patch! Repository: rL LLVM https://reviews.llvm.org/D32421 ___ lldb-commits maili

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-05 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302225: Fix segfault resulting from empty print prompt (authored by labath). Changed prior to commit: https://reviews.llvm.org/D32421?vs=97717&id=97937#toc Repository: rL LLVM https://reviews.llvm.o

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-04 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. I do not have commit access. I would appreciate it if you could commit it for me. https://reviews.llvm.org/D32421 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-04 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Perfect, thank you. Do you have commit access? https://reviews.llvm.org/D32421 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-03 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 97717. xiaobai added a comment. Moving test per @labath's suggestion https://reviews.llvm.org/D32421 Files: packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py source/Host/common/Editline.cpp Index: source/Host/com

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It's definitely still a bug worth fixing, we cannot rely on undefined behavior like that. Thank you very much for adding the test case. Looking at the test suite again, I think I've found a better place for the test. Could you put the test in test/testcases/expression_c

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-03 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. Over the weekend I dug into this further. It looks like the environment I found this bug in didn't have C++11 support and was using `std::string::length()`, which tries to perform a memory read where it's not supposed to, resulting in a segfault. On my friend's Ubuntu s

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-02 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 97553. xiaobai added a comment. Updating per @labath's suggestions https://reviews.llvm.org/D32421 Files: packages/Python/lldbsuite/test/functionalities/print/TestPrintEmptyExpressionList.py source/Host/common/Editline.cpp Index: source/Host/common/E

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @krytarowski: Thanks for checking! I can set up a NetBSD environment sometime in the next few days to see what's going on. While it might not be an issue on this platform, I think it's an issue that MoveCursor() accesses `m_input_lines[m_input_lines.size() - 1]` without

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-25 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks for the patch Alex. After looking around the code a bit (I'm quite new to that area as well), I think a better approach would be to fix MoveCursor to handle this situation gracefully. If you look at what this code does in the "normal" case, you'll see that it del

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-25 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I cannot reproduce it locally. $ lldb (lldb) print Enter expressions, then terminate with an empty line to evaluate: (lldb) Enter expressions, then terminate with an empty line to evaluate: (lldb) Steps: 1. start lldb 2. "print" 3. 4. `NetBSD 7.99.7

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-24 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. I have found a way to segfault lldb in 7 keystrokes! Steps to reproduce: 1. Launch lldb 2. Type `print` and hit enter. lldb will now prompt you to type a list of expressions, followed by an empty line. 3. Hit enter, indicating the end of your input. 4. Segfault! A