[Lldb-commits] [lldb] r367441 - Don't crash when pass by value struct has no definition.

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 23:24:13 PDT 2019


On 01/08/2019 00:14, Jim Ingham via lldb-commits wrote:
> 
> 
>> On Jul 31, 2019, at 12:50 PM, via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>>
>>
>>
>>> -----Original Message-----
>>> From: lldb-commits [mailto:lldb-commits-bounces at lists.llvm.org] On Behalf
>>> Of Greg Clayton via lldb-commits
>>> Sent: Wednesday, July 31, 2019 2:29 PM
>>> To: Raphael Isemann
>>> Cc: lldb-commits
>>> Subject: Re: [Lldb-commits] [lldb] r367441 - Don't crash when pass by
>>> value struct has no definition.
>>>
>>>
>>>
>>>> On Jul 31, 2019, at 10:57 AM, Raphael Isemann <teemperor at gmail.com>
>>> wrote:
>>>>
>>>> It seems that patch is lacking a test (which doesn't seem too hard to
>>> provide).
>>>
>>> I am not the original author of this patch that was causing the crash,
>>> just fixing a crash that was introduced by the patch.
>>>
>>> I am all ears for anyone that can provide me with DWARF to help reproduce
>>> this scenario where we have a DW_CC_pass_by_value struct with no
>>> definition. Not sure how you would have a compiler that is passing a
>>> struct to a function as a parameter and yet does not emit debug info for
>>> that struct it is clearly using in the debug info.

Presumably one could construct a type DIE by hand which contains a 
DW_AT_declaration and a DW_AT_calling_convention. Even if this isn't the 
exact same way how the original bug came to be, it is a still a valid 
thing to test, and so it's better than no test at all.

That said, if the problem here is that the type is not fully defined, I 
am wondering if it wouldn't be better to move the calling convention 
stuff into the if(!is_forward_declaration) block right above it.
pl


More information about the lldb-commits mailing list