[PATCH] D126835: Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic).

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 17:08:27 PDT 2022


ayermolo added a comment.

In D126835#3602445 <https://reviews.llvm.org/D126835#3602445>, @dblaikie wrote:

> In D126835#3602351 <https://reviews.llvm.org/D126835#3602351>, @ayermolo wrote:
>
>> In D126835#3602110 <https://reviews.llvm.org/D126835#3602110>, @dblaikie wrote:
>>
>>> In D126835#3601856 <https://reviews.llvm.org/D126835#3601856>, @ayermolo wrote:
>>>
>>>> In D126835#3600910 <https://reviews.llvm.org/D126835#3600910>, @dblaikie wrote:
>>>>
>>>>> In D126835#3600547 <https://reviews.llvm.org/D126835#3600547>, @ayermolo wrote:
>>>>>
>>>>>> In D126835#3600524 <https://reviews.llvm.org/D126835#3600524>, @dblaikie wrote:
>>>>>>
>>>>>>> Looks like this would be another issue with zero-length symbols: https://reviews.llvm.org/D127897 (just cross-referencing/collating)
>>>>>>
>>>>>> Well it's an issue right now even without this change.
>>>>>
>>>>> Sorry, what I meant is: This issue (D126835 <https://reviews.llvm.org/D126835>) and the other (D127897 <https://reviews.llvm.org/D127897>) would probably both be better-off solved by changing the compiler/LLVM to never produce zero-length entries.
>>>>
>>>> Oh I see.
>>>> Some more context. Debug info that D127897 <https://reviews.llvm.org/D127897> is handling is coming from GCC.
>>>
>>> Oh, that surprises me - could you provide repro steps?
>>
>>
>>
>>   int conv32(const void* ptr) { return *(const int *) ptr; }
>>   
>>   int foo(const void* ptr) {
>>     return conv32(ptr) + 2;
>>   }
>>
>> gcc -g -gstrict-dwarf -gz=none -O3 helper.cpp -c
>> Version  11.2.1
>
> Huh - I'd argue that's /probably/ a bug in GCC? Describing a zero-length inlined scope seems of minimal value. I guess some very late optimization probably causes this in GCC. Might be worth filing a bug on GCC or otherwise asking them about that situation (if you do, please CC me - I'd be curious to follow along).

Let me put it on my TODO list.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126835/new/

https://reviews.llvm.org/D126835



More information about the llvm-commits mailing list