<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I appreciate the initiative in getting this fixed during the holiday break.  Thanks!  The editline commit pulled several entwined changes together to simplify integration.  I’ve alerted Greg Clayton to the issue and fix so he can review for any alternative approaches that will keep the code base sustainable, as the general IOHandler area is more his field.<div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="" style="font-family: LucidaGrande; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><font color="#424242" class="" style="font-family: 'Lucida Grande'; font-size: x-small;">Kate Stone</font><span class="" style="font-family: 'Lucida Grande'; font-size: x-small;"> </span><font color="#009193" class="" style="font-family: 'Lucida Grande'; font-size: x-small;"><a href="mailto:k8stone@apple.com" class="">k8stone@apple.com</a></font></div><div class="" style="font-family: Times; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><font face="Lucida Grande" size="1" class=""><font color="#009193" class=""></font> Xcode <font color="#424242" class="">Runtime Analysis Tools</font></font></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Nov 26, 2014, at 2:21 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com" class="">Hafiz_Abid@mentor.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Thanks all for your comments. I have added a comment describing that order is important and committed the patch.<br class=""><br class="">Regards,<br class="">Abid<br class=""><br class=""><blockquote type="cite" class="">-----Original Message-----<br class="">From: <a href="mailto:dawn@burble.org" class="">dawn@burble.org</a> [<a href="mailto:dawn@burble.org" class="">mailto:dawn@burble.org</a>]<br class="">Sent: 26 November 2014 05:38<br class="">To: Zachary Turner<br class="">Cc: Jason Molenda; Abid, Hafiz; Kate Stone; <a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">Subject: Re: [Lldb-commits] [lldb] r222163 - Complete rewrite of interactive<br class="">editing support for single- and multi-line input.<br class=""><br class="">In case there was any doubt, yes, your interpretations are correct, except for<br class="">virtual base classes :) (speaking as a member of the C++ ANSI committee and<br class="">co-editor of the standard).<br class=""><br class="">On Wed, Nov 26, 2014 at 02:09:31AM +0000, Zachary Turner wrote:<br class=""><blockquote type="cite" class="">FWIW I agree with Abid's interpretation of the standard.<br class=""><br class="">A comment on the inheritance list would be nice here though,<br class="">indicating that the order of declaration is important.<br class="">On Tue Nov 25 2014 at 4:50:09 PM Jason Molenda <<a href="mailto:jason@molenda.com" class="">jason@molenda.com</a>><br class=""></blockquote>wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">I think you should commit this patch.  I don't know this corner of<br class="">the standard very well but if TOT is crashing for all Linux users,<br class="">it'd be better to tentatively accept the change until Kate is back<br class="">on-line next week.<br class=""><br class="">J<br class=""><br class=""><blockquote type="cite" class="">On Nov 25, 2014, at 5:58 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com" class="">Hafiz_Abid@mentor.com</a>><br class=""></blockquote></blockquote></blockquote>wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">Hi Kate,<br class="">I observed that this change is causing crash on Linux whenever a<br class=""></blockquote>confirmation is shown to the user (e.g. breakpoint delete or quit).<br class="">I think the following code is responsible. It is casting this<br class="">pointer in initializer list to a base class which is still not initialized.<br class=""><blockquote type="cite" class=""><br class="">IOHandlerConfirm::IOHandlerConfirm (Debugger &debugger,<br class="">                                   const char *prompt,<br class="">                                   bool default_response) :<br class="">   IOHandlerEditline(debugger,<br class="">                     IOHandler::Type::Confirm,<br class="">                     NULL,     // NULL editline_name means no history<br class=""></blockquote>loaded/saved<br class=""><blockquote type="cite" class="">                     NULL,     // No prompt<br class="">                     NULL,     // No continuation prompt<br class="">                     false,    // Multi-line<br class="">                     false,    // Don't colorize the prompt (i.e. the<br class=""></blockquote>confirm message.)<br class=""><blockquote type="cite" class="">                     0,<br class="">                     *this),<br class="">   m_default_response (default_response),<br class="">   m_user_response (default_response)<br class=""><br class="">If my reading of C++ standard is correct, the constructor of base<br class=""></blockquote>classes are called in order in which they are declared (12.6.2<br class="">(10)). So *this is basically casting IOHandlerConfirm to its base<br class="">IOHandlerDelegate and passing it to constructor of IOHandlerEditline<br class="">which uses it and crashes as constructor of IOHandlerDelegate is still not<br class=""></blockquote></blockquote>called.<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">I changed the order of base classes in the declaration of<br class=""></blockquote>IOHandlerConfirm and it seems to have fixed this issue. Please have<br class="">a look at the attached patch and let me know if it looks ok to you.<br class=""><blockquote type="cite" class=""><br class="">Thanks,<br class="">Abid<br class=""><br class=""><br class=""><blockquote type="cite" class="">-----Original Message-----<br class="">From: <a href="mailto:lldb-commits-bounces@cs.uiuc.edu" class="">lldb-commits-bounces@cs.uiuc.edu</a> [mailto:lldb-commits-<br class=""><a href="mailto:bounces@cs.uiuc.edu" class="">bounces@cs.uiuc.edu</a>] On Behalf Of Shawn Best<br class="">Sent: 18 November 2014 19:03<br class="">To: Ed Maste; Kate Stone<br class="">Cc: <a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">Subject: Re: [Lldb-commits] [lldb] r222163 - Complete rewrite of<br class=""></blockquote></blockquote>interactive<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">editing support for single- and multi-line input.<br class=""><br class="">I can confirm the two issues you cite also started failing on<br class="">linux<br class=""></blockquote></blockquote>around the<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">time of this changes. Greg's checkin yesterday fixed<br class="">TestCommandRegex,<br class=""></blockquote></blockquote>but<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">TestGlobalVariables is still failing.<br class=""><br class="">On 11/17/2014 11:46 AM, Ed Maste wrote:<br class=""><blockquote type="cite" class="">On 17 November 2014 14:07, Kate Stone<br class=""><<a href="mailto:katherine.stone@apple.com" class="">katherine.stone@apple.com</a>><br class=""></blockquote>wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Author: kate<br class="">Date: Mon Nov 17 13:06:59 2014<br class="">New Revision: 222163<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222163&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=222163&view=rev</a><br class="">Log:<br class="">Complete rewrite of interactive editing support for single- and<br class=""></blockquote></blockquote></blockquote></blockquote>multi-line<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">input.<br class=""><blockquote type="cite" class="">FYI, two new test failures appeared on FreeBSD after this<br class="">change. I'm curious if the Linux guys see similar behaviour.<br class=""><br class=""><br class="">FAIL: LLDB (/usr/bin/clang-x86_64) :: test_with_dwarf<br class="">(TestGlobalVariables.GlobalVariablesTestCase)<br class=""><br class=""></blockquote><br class=""></blockquote></blockquote></blockquote></blockquote>================================================================<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">======<br class=""><blockquote type="cite" class="">FAIL: test_with_dwarf (TestGlobalVariables.GlobalVariablesTestCase)<br class="">   Test 'frame variable --scope --no-args' which omits args and<br class="">shows<br class=""></blockquote>scopes.<br class=""><blockquote type="cite" class="">----------------------------------------------------------------<br class="">------ Traceback (most recent call last):<br class="">  File "/tank/emaste/src/llvm/tools/lldb/test/lldbtest.py", line<br class="">382,<br class=""></blockquote></blockquote></blockquote>in<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">wrapper<br class=""><blockquote type="cite" class="">    return func(self, *args, **kwargs)<br class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/lang/c/global_variables/T<br class="">estGlo<br class="">balVariables.py",<br class="">line 24, in test_with_dwarf<br class="">    self.global_variables()<br class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/lang/c/global_variables/T<br class="">estGlo<br class="">balVariables.py",<br class="">line 60, in global_variables<br class="">    'stop reason = breakpoint'])<br class="">  File "/tank/emaste/src/llvm/tools/lldb/test/lldbtest.py", line<br class=""></blockquote></blockquote></blockquote>1886, in<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">expect<br class=""><blockquote type="cite" class="">    self.runCmd(str, msg=msg, trace = (True if trace else<br class="">False), check = not error, inHistory=inHistory)<br class="">  File "/tank/emaste/src/llvm/tools/lldb/test/lldbtest.py", line<br class=""></blockquote></blockquote></blockquote>1812, in<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">runCmd<br class=""><blockquote type="cite" class="">    msg if msg else CMD_MSG(cmd))<br class="">AssertionError: False is not True : Process should be stopped<br class="">due to breakpoint Config=x86_64-/usr/bin/clang<br class="">----------------------------------------------------------------<br class="">------<br class="">Ran 2 tests in 0.200s<br class=""><br class="">FAILED (failures=1, skipped=1)<br class=""><br class=""><br class="">FAIL: LLDB (/usr/bin/clang-x86_64) :: test_command_regex<br class="">(TestCommandRegex.CommandRegexTestCase)<br class=""><br class=""></blockquote><br class=""></blockquote></blockquote></blockquote></blockquote>================================================================<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">======<br class=""><blockquote type="cite" class="">ERROR: test_command_regex<br class=""></blockquote>(TestCommandRegex.CommandRegexTestCase)<br class=""><blockquote type="cite" class="">   Test a simple scenario of 'command regex' invocation and<br class="">subsequent<br class=""></blockquote>use.<br class=""><blockquote type="cite" class="">----------------------------------------------------------------<br class="">------ Traceback (most recent call last):<br class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/functionalities/command_r<br class="">egex/T<br class="">estCommandRegex.py",<br class="">line 38, in test_command_regex<br class="">    child.expect('The following is a list of built-in, permanent<br class="">debugger commands:')<br class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/pexpect-2.4/pexpect.py",<br class="">line 1316, in expect<br class="">    return self.expect_list(compiled_pattern_list, timeout,<br class=""></blockquote>searchwindowsize)<br class=""><blockquote type="cite" class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/pexpect-2.4/pexpect.py",<br class="">line 1330, in expect_list<br class="">    return self.expect_loop(searcher_re(pattern_list), timeout,<br class="">searchwindowsize)<br class="">  File<br class="">"/tank/emaste/src/llvm/tools/lldb/test/pexpect-2.4/pexpect.py",<br class="">line 1414, in expect_loop<br class="">    raise TIMEOUT (str(e) + '\n' + str(self))<br class="">TIMEOUT: Timeout exceeded in read_nonblocking().<br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></blockquote><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></blockquote><br class=""></blockquote></blockquote></blockquote><IOHandler.patch>_______________________________________________<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""><br class=""></blockquote></blockquote><br class=""><blockquote type="cite" class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></blockquote></blockquote><br class=""></div></blockquote></div><br class=""></div></body></html>