Assertion failure (Bug 21609) in DwarfFile.cpp

Hi Folks,

I ran into this assertion failure while compiling a function with a
large number of arguments:

https://llvm.org/bugs/show_bug.cgi?id=21609

I have coded up the fix as per David's suggestion (added a new header
field for DIVariable to separate out ArgNo & LineNo). The proposed
diff is attached to the bug.

However, there are around 175 testcases across clang & llvm that need
to be udpated to reflect the new schema. One such eg:

diff --git a/test/Instrumentation/AddressSanitizer/debug_info.ll
b/test/Instrumentation/AddressSanitizer/debug_info.ll
index c0939c5..4112f14 100644
--- a/test/Instrumentation/AddressSanitizer/debug_info.ll
+++ b/test/Instrumentation/AddressSanitizer/debug_info.ll
@@ -41,9 +41,9 @@ declare void @llvm.dbg.declare(metadata, metadata,
metadata) nounwind readnone
!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !8,
null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align
0, offset 0] [from ]
!8 = !{!9, !9}
!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [
DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc
DW_ATE_signed]
-!10 = !{!"0x101\00p\0016777217\000", !5, !6, !9} ; [
DW_TAG_arg_variable ] [p] [line 1]
+!10 = !{!"0x101\00p\001\001\000", !5, !6, !9} ; [ DW_TAG_arg_variable
] [p] [line 1]
!11 = !MDLocation(line: 1, scope: !5)
-!12 = !{!"0x100\00r\002\000", !13, !6, !9} ; [ DW_TAG_auto_variable ]
[r] [line 2]
+!12 = !{!"0x100\00r\002\000\000", !13, !6, !9} ; [
DW_TAG_auto_variable ] [r] [line 2]

Before I spend cycles updating the test cases, I wanted get a 'go
ahead' from code owners.

Please let me know.

Thanks,
Sandeep

I believe duncan’s fixed this recently in 235956 and 235955 - does ToT work for you?

I believe duncan's fixed this recently in 235956 and 235955 - does ToT work
for you?

It seems like r235955 might have fixed it. However I'm having build
issues with ToT in my environment. Is this the right place to check
ToT build status:

http://lab.llvm.org:8011/one_line_per_build

Hi Folks,

I ran into this assertion failure while compiling a function with a
large number of arguments:

https://llvm.org/bugs/show_bug.cgi?id=21609

I have coded up the fix as per David's suggestion (added a new header
field for DIVariable to separate out ArgNo & LineNo). The proposed
diff is attached to the bug.

However, there are around 175 testcases across clang & llvm that need
to be udpated to reflect the new schema. One such eg:

The debug info has changed substantially in the last few months - those
changes made a lot of churn to the test cases and, as a biproduct, made it
unnecessary to update any test cases for this change.

Ok. The debug info has indeed changed substantially in ToT. I have a
3.6 release from around March 1st.

Thanks,
Sandeep

> I believe duncan's fixed this recently in 235956 and 235955 - does ToT
work
> for you?

It seems like r235955 might have fixed it. However I'm having build
issues with ToT in my environment. Is this the right place to check
ToT build status:

http://lab.llvm.org:8011/one_line_per_build

More or less - though honestly there are a lot of flakey/bad builders so
some of those reds aren't actually all that important.

Happy to help with any specific problems.

>
>>
>> Hi Folks,
>>
>> I ran into this assertion failure while compiling a function with a
>> large number of arguments:
>>
>> https://llvm.org/bugs/show_bug.cgi?id=21609
>>
>> I have coded up the fix as per David's suggestion (added a new header
>> field for DIVariable to separate out ArgNo & LineNo). The proposed
>> diff is attached to the bug.
>>
>> However, there are around 175 testcases across clang & llvm that need
>> to be udpated to reflect the new schema. One such eg:
>
>
> The debug info has changed substantially in the last few months - those
> changes made a lot of churn to the test cases and, as a biproduct, made
it
> unnecessary to update any test cases for this change.

Ok. The debug info has indeed changed substantially in ToT. I have a
3.6 release from around March 1st.

*nod* it's difficult to submit patches for LLVM if you're not working on
ToT, unfortunately.

> I believe duncan's fixed this recently in 235956 and 235955 - does ToT
> work
> for you?

It seems like r235955 might have fixed it. However I'm having build
issues with ToT in my environment. Is this the right place to check
ToT build status:

http://lab.llvm.org:8011/one_line_per_build

More or less - though honestly there are a lot of flakey/bad builders so
some of those reds aren't actually all that important.

Happy to help with any specific problems.

Thanks! I must have picked up the ToT in a funky state. I just pulled
ToT afresh & it built fine. Fix (r235955) verified.

>
>>
>> Hi Folks,
>>
>> I ran into this assertion failure while compiling a function with a
>> large number of arguments:
>>
>> https://llvm.org/bugs/show_bug.cgi?id=21609
>>
>> I have coded up the fix as per David's suggestion (added a new header
>> field for DIVariable to separate out ArgNo & LineNo). The proposed
>> diff is attached to the bug.
>>
>> However, there are around 175 testcases across clang & llvm that need
>> to be udpated to reflect the new schema. One such eg:
>
>
> The debug info has changed substantially in the last few months - those
> changes made a lot of churn to the test cases and, as a biproduct, made
> it
> unnecessary to update any test cases for this change.

Ok. The debug info has indeed changed substantially in ToT. I have a
3.6 release from around March 1st.

*nod* it's difficult to submit patches for LLVM if you're not working on
ToT, unfortunately.

Duly noted. Thanks again.

Sandeep