FWIW I agree with Abid's interpretation of the standard.  <br><br>A comment on the inheritance list would be nice here though, indicating that the order of declaration is important.<br><div class="gmail_quote">On Tue Nov 25 2014 at 4:50:09 PM Jason Molenda <<a href="mailto:jason@molenda.com">jason@molenda.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think you should commit this patch.  I don't know this corner of the standard very well but if TOT is crashing for all Linux users, it'd be better to tentatively accept the change until Kate is back on-line next week.<br>
<br>
J<br>
<br>
> On Nov 25, 2014, at 5:58 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com" target="_blank">Hafiz_Abid@mentor.com</a>> wrote:<br>
><br>
> Hi Kate,<br>
> I observed that this change is causing crash on Linux whenever a confirmation is shown to the user (e.g. breakpoint delete or quit). I think the following code is responsible. It is casting this pointer in initializer list to a base class which is still not initialized.<br>
><br>
> IOHandlerConfirm::<u></u>IOHandlerConfirm (Debugger &debugger,<br>
>                                    const char *prompt,<br>
>                                    bool default_response) :<br>
>    IOHandlerEditline(debugger,<br>
>                      IOHandler::Type::Confirm,<br>
>                      NULL,     // NULL editline_name means no history loaded/saved<br>
>                      NULL,     // No prompt<br>
>                      NULL,     // No continuation prompt<br>
>                      false,    // Multi-line<br>
>                      false,    // Don't colorize the prompt (i.e. the confirm message.)<br>
>                      0,<br>
>                      *this),<br>
>    m_default_response (default_response),<br>
>    m_user_response (default_response)<br>
><br>
> If my reading of C++ standard is correct, the constructor of base classes are called in order in which they are declared (12.6.2 (10)). So *this is basically casting IOHandlerConfirm to its base IOHandlerDelegate and passing it to constructor of IOHandlerEditline which uses it and crashes as constructor of IOHandlerDelegate is still not called.<br>
><br>
> I changed the order of base classes in the declaration of IOHandlerConfirm and it seems to have fixed this issue. Please have a look at the attached patch and let me know if it looks ok to you.<br>
><br>
> Thanks,<br>
> Abid<br>
><br>
><br>
>> -----Original Message-----<br>
>> From: <a href="mailto:lldb-commits-bounces@cs.uiuc.edu" target="_blank">lldb-commits-bounces@cs.uiuc.<u></u>edu</a> [mailto:<a href="mailto:lldb-commits-" target="_blank">lldb-commits-</a><br>
>> <a href="mailto:bounces@cs.uiuc.edu" target="_blank">bounces@cs.uiuc.edu</a>] On Behalf Of Shawn Best<br>
>> Sent: 18 November 2014 19:03<br>
>> To: Ed Maste; Kate Stone<br>
>> Cc: <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
>> Subject: Re: [Lldb-commits] [lldb] r222163 - Complete rewrite of interactive<br>
>> editing support for single- and multi-line input.<br>
>><br>
>> I can confirm the two issues you cite also started failing on linux around the<br>
>> time of this changes. Greg's checkin yesterday fixed TestCommandRegex, but<br>
>> TestGlobalVariables is still failing.<br>
>><br>
>> On 11/17/2014 11:46 AM, Ed Maste wrote:<br>
>>> On 17 November 2014 14:07, Kate Stone <<a href="mailto:katherine.stone@apple.com" target="_blank">katherine.stone@apple.com</a>><br>
>> wrote:<br>
>>>> Author: kate<br>
>>>> Date: Mon Nov 17 13:06:59 2014<br>
>>>> New Revision: 222163<br>
>>>><br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222163&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=222163&view=rev</a><br>
>>>> Log:<br>
>>>> Complete rewrite of interactive editing support for single- and multi-line<br>
>> input.<br>
>>> FYI, two new test failures appeared on FreeBSD after this change. I'm<br>
>>> curious if the Linux guys see similar behaviour.<br>
>>><br>
>>><br>
>>> FAIL: LLDB (/usr/bin/clang-x86_64) :: test_with_dwarf<br>
>>> (TestGlobalVariables.<u></u>GlobalVariablesTestCase)<br>
>>><br>
>> ==============================<u></u>==============================<u></u>====<br>
>> ======<br>
>>> FAIL: test_with_dwarf (TestGlobalVariables.<u></u>GlobalVariablesTestCase)<br>
>>>    Test 'frame variable --scope --no-args' which omits args and shows<br>
>> scopes.<br>
>>> ------------------------------<u></u>------------------------------<u></u>----------<br>
>>> Traceback (most recent call last):<br>
>>>   File "/tank/emaste/src/llvm/tools/<u></u>lldb/test/lldbtest.py", line 382, in<br>
>> wrapper<br>
>>>     return func(self, *args, **kwargs)<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/lang/c/global_<u></u>variables/TestGlo<br>
>>> balVariables.py",<br>
>>> line 24, in test_with_dwarf<br>
>>>     self.global_variables()<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/lang/c/global_<u></u>variables/TestGlo<br>
>>> balVariables.py",<br>
>>> line 60, in global_variables<br>
>>>     'stop reason = breakpoint'])<br>
>>>   File "/tank/emaste/src/llvm/tools/<u></u>lldb/test/lldbtest.py", line 1886, in<br>
>> expect<br>
>>>     self.runCmd(str, msg=msg, trace = (True if trace else False),<br>
>>> check = not error, inHistory=inHistory)<br>
>>>   File "/tank/emaste/src/llvm/tools/<u></u>lldb/test/lldbtest.py", line 1812, in<br>
>> runCmd<br>
>>>     msg if msg else CMD_MSG(cmd))<br>
>>> AssertionError: False is not True : Process should be stopped due to<br>
>>> breakpoint Config=x86_64-/usr/bin/clang<br>
>>> ------------------------------<u></u>------------------------------<u></u>----------<br>
>>> Ran 2 tests in 0.200s<br>
>>><br>
>>> FAILED (failures=1, skipped=1)<br>
>>><br>
>>><br>
>>> FAIL: LLDB (/usr/bin/clang-x86_64) :: test_command_regex<br>
>>> (TestCommandRegex.<u></u>CommandRegexTestCase)<br>
>>><br>
>> ==============================<u></u>==============================<u></u>====<br>
>> ======<br>
>>> ERROR: test_command_regex<br>
>> (TestCommandRegex.<u></u>CommandRegexTestCase)<br>
>>>    Test a simple scenario of 'command regex' invocation and subsequent<br>
>> use.<br>
>>> ------------------------------<u></u>------------------------------<u></u>----------<br>
>>> Traceback (most recent call last):<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/functionalities/<u></u>command_regex/T<br>
>>> estCommandRegex.py",<br>
>>> line 38, in test_command_regex<br>
>>>     child.expect('The following is a list of built-in, permanent<br>
>>> debugger commands:')<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/pexpect-2.4/pexpect.<u></u>py",<br>
>>> line 1316, in expect<br>
>>>     return self.expect_list(compiled_<u></u>pattern_list, timeout,<br>
>> searchwindowsize)<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/pexpect-2.4/pexpect.<u></u>py",<br>
>>> line 1330, in expect_list<br>
>>>     return self.expect_loop(searcher_re(<u></u>pattern_list), timeout,<br>
>>> searchwindowsize)<br>
>>>   File<br>
>>> "/tank/emaste/src/llvm/tools/<u></u>lldb/test/pexpect-2.4/pexpect.<u></u>py",<br>
>>> line 1414, in expect_loop<br>
>>>     raise TIMEOUT (str(e) + '\n' + str(self))<br>
>>> TIMEOUT: Timeout exceeded in read_nonblocking().<br>
>>> ______________________________<u></u>_________________<br>
>>> lldb-commits mailing list<br>
>>> <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
>><br>
>> ______________________________<u></u>_________________<br>
>> lldb-commits mailing list<br>
>> <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
> <IOHandler.patch>_____________<u></u>______________________________<u></u>____<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
</blockquote></div>