[llvm-dev] workaround for debug info bug?

Andrew Kelley via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 15 07:36:12 PST 2017


Thanks for the repros.

I think this line may be the problem:

!30 = distinct !DICompositeType(tag: DW_TAG_union_type, name: "Foo", scope:
!30, file: !5, line: 1, size: 32, align: 32, elements: !31)


The scope is itself. I'll investigate this in the frontend.

On Wed, Nov 15, 2017 at 9:29 AM, UE US via llvm-dev <llvm-dev at lists.llvm.org
> wrote:

> It reproduces with trunk on linux here as well.
>
> ...
> #231 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #232 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #233 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #234 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #235 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #236 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #237 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #238 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #239 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #240 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #241 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #242 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #243 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #244 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #245 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #246 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #247 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #248 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #249 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #250 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #251 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #252 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #253 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> #254 0x0000000004c5faf2 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:714:0
> #255 0x0000000004c5f822 llvm::DwarfUnit::getOrCreateContextDIE(llvm::DIScope
> const*) /home/jimshinns/llvm-6.0-src/lib/CodeGen/AsmPrinter/
> DwarfUnit.cpp:671:0
> Stack dump:
> 0.    Program arguments: /usr/local/bin/clang-6.0 -cc1 -triple
> x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
> -main-file-name test.ll -mrelocation-model static -mthread-model posix
> -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
> -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
> -debugger-tuning=gdb -coverage-notes-file /home/jimshinns/test.gcno
> -resource-dir /usr/local/lib/clang/6.0.0 -fdebug-compilation-dir
> /home/jimshinns -ferror-limit 19 -fmessage-length 80 -fobjc-runtime=gcc
> -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x ir test.ll
> 1.    Code generation
> clang-6.0: error: unable to execute command: Segmentation fault (core
> dumped)
> clang-6.0: error: clang frontend command failed due to signal (use -v to
> see invocation)
> clang version 6.0.0 (trunk 318165)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /usr/local/bin
>
>
> GNOMETOYS
>
> On Wed, Nov 15, 2017 at 2:00 AM, Nemanja Ivanovic via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Seems like something infinite-recursion like to me:
>> $ clang --version
>> clang version 6.0.0 (trunk 317833)
>> Target: powerpc64le-unknown-linux-gnu
>> $ clang -c test.ll
>> warning: overriding the module target triple with
>> powerpc64le-unknown-linux-gnu [-Woverride-module]
>> ...
>> #255 0x0000000012b07a78 llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode
>> const*)
>> ...
>>
>> So I'd say it reproduces.
>>
>> On Wed, Nov 15, 2017 at 6:20 AM, 陳韋任 via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Test on Mac, with not latest but trunk code. I get error below:
>>>
>>> $ clang -c test.ll
>>> warning: overriding the module target triple with
>>> x86_64-apple-macosx10.13.0 [-Woverride-module]
>>> clang-6.0: error: unable to execute command: Illegal instruction: 4
>>>
>>>
>>> ​I see no infinite recursion here.​
>>>
>>>
>>> --
>>> Wei-Ren Chen (陳韋任)
>>> Homepage: https://people.cs.nctu.edu.tw/~chenwj
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171115/59391b2b/attachment.html>


More information about the llvm-dev mailing list