[llvm] r211282 - MCNullStreamer: assign file IDs to resolve crashes and errors

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jun 20 05:47:59 PDT 2014


It crashes with:

./bin/llc -O0 -filetype=null
/home/espindola/llvm/llvm/test/DebugInfo/global.ll -o test.o
-mtriple=arm-linux-gnu

On 20 June 2014 08:08, Alp Toker <alp at nuanti.com> wrote:
> Do you know how I could get a backtrace? There's not much to go on here
>
>
> On 20 June 2014 09:22:02 BST, Renato Golin <renato.golin at linaro.org> wrote:
>>
>> Hi Alp,
>>
>> This commit is breaking with a segfault on ARM:
>>
>>
>> http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a15/builds/1788/steps/check-all/logs/LLVM%3A%3Aglobal.ll
>>
>> cheers,
>> --renato
>>
>> On 19 June 2014 18:15, Alp Toker <alp at nuanti.com> wrote:
>>>
>>>  Author: alp
>>>  Date: Thu Jun 19 12:15:36 2014
>>>  New Revision: 211282
>>>
>>>  URL: http://llvm.org/viewvc/llvm-project?rev=211282&view=rev
>>>  Log:
>>>  MCNullStreamer: assign file IDs to resolve crashes and errors
>>>
>>>  Use the MCStreamer base implementations for file ID tracking instead of
>>>  overriding them as
>>> no-ops.
>>>
>>>  Avoids assertions when streaming Dwarf debug info, and fixes ASM parsing
>>> of loc
>>>  and file directives.
>>>
>>>  Modified:
>>>      llvm/trunk/lib/MC/MCNullStreamer.cpp
>>>      llvm/trunk/test/DebugInfo/global.ll
>>>      llvm/trunk/test/MC/AsmParser/directive_file.s
>>>      llvm/trunk/test/MC/AsmParser/directive_line.s
>>>      llvm/trunk/test/MC/AsmParser/directive_loc.s
>>>
>>>  Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
>>>  URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=211282&r1=211281&r2=211282&view=diff
>>> ________________________________
>>>
>>>  --- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
>>>  +++ llvm/trunk/lib/MC/MCNullStreamer.cpp Thu Jun 19 12:15:36 2014
>>>  @@ -81,15 +81,7 @@ namespace {
>>>                              unsigned char Value = 0) overri!
>>>  de {
>>> return false; }
>>>
>>>
>>>       void EmitFileDirective(StringRef Filename) override {}
>>>  -    unsigned EmitDwarfFileDirective(unsigned FileNo, StringRef
>>> Directory,
>>>  -                                    StringRef Filename,
>>>  -                                    unsigned CUID = 0) override {
>>>  -      return 0;
>>>  -    }
>>>  -    void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
>>>  -                               unsigned Column, unsigned Flags,
>>>  -                               unsigned Isa, unsigned Discriminator,
>>>  -                               StringRef FileName) override {}
>>>  +
>>>       void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo&)
>>> override {}
>>>
>>>       void EmitBundleAlignMode(unsigned AlignPow2) override {}
>>>
>>>  Modified: llvm/trunk/test/DebugInfo/global.ll
>>>  URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/global.ll?rev=211282&r1=211281&r2=211282&view=diff
>>> ________________________________
>>>
>>>  --- llvm/trunk/test/DebugInfo/global.ll (original)
>>>  +++ llvm/trunk/test/DebugInfo/global.ll Thu Jun 19 12:15:36 2014
>>>  @@ -3,6 +3,9 @@
>>>   ; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
>>>   ; RUN: llvm-dwarfdump %t | FileCheck %s
>>>
>>>  +; Also test that the null streamer doesn't crash with debug info.
>>>  +; RUN: %llc_dwarf -O0 -filetype=null < %s
>>>  +
>>>   ; generated from the following source compiled to bitcode with clang -g
>>> -O1
>>>   ; static int i;
>>>   ; int main() {
>>>
>>>  Modified: llvm/trunk/test/MC/AsmParser/directive_file.s
>>>  URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_file.s?rev=211282&r1=211281&r2=211282&view=diff
>>> ________________________________
>>>
>>>  --- llvm/trunk/test/MC/AsmParser/directive_file.s (original)
>>>  +++ llvm/trunk/test/MC/AsmParser/directive_file.s Thu Jun 19 12:15:36
>>> 2014
>>>  @@ -1,4 +1,5 @@
>>>   # RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
>>>  +# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
>>>
>>>           .file "hello"
>>>           .file 1 "worl\144"   # "\144" is "d"
>>>
>>>  Modified: llvm/trunk/test/MC/AsmParser/directive_line.s
>>>  URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_line.s?rev=211282&r1=211281&r2=211282&view=diff
>>> ________________________________
>>>
>>>  --- llvm/trunk/test/MC/AsmParser/directive_line.s (original)
>>>  +++ llvm/trunk/test/MC/AsmParser/directive_line.s Thu Jun 19 12:15:36
>>> 2014
>>>  @@ -1,4 +1,5 @@
>>>   # RUN: llvm-mc -triple i386-unknown-unknown %s
>>>  +# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
>>>   # FIXME: Actually test the output.
>>>
>>>           .line
>>>
>>>  Modified: llvm/trunk/test/MC/AsmParser/directive_loc.s
>>>  URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_loc.s?rev=211282&r1=211281&r2=211282&view=diff
>>> ________________________________
>>>
>>>  --- llvm/trunk/test/MC/AsmParser/directive_loc.s (original)
>>>  +++ llvm/trunk/test/MC/AsmParser/directive_loc.s Thu Jun 19 12:15:36
>>> 2014
>>>  @@ -1,4 +1,5 @@
>>>   # RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
>>>  +# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=null
>>>
>>>           .file 1 "hello"
>>>   # CHECK: .file 1 "hello"
>>>
>>>
>>> ________________________________
>>>
>>>  llvm-commits mailing list
>>>  llvm-commits at cs.uiuc.edu
>>>  http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list