[llvm-bugs] [Bug 30702] New: ICE when compiling with --coverage but without -g

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 14 10:59:08 PDT 2016


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

            Bug ID: 30702
           Summary: ICE when compiling with --coverage but without -g
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: gccas
          Assignee: unassignedbugs at nondot.org
          Reporter: charles_li at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

We noticed an ICE when compiling a file with the flag '--coverage' but without
'-g'.
This happens on many test-cases (maybe all test-cases), even empty test cases.

This ICE is related to commits r264657 and r281508.

To reproduce this crash:

  Create (empty) test-case
  $ touch t.cpp

  Successful compilation:
  $ clang -c -g --coverage t.cpp

  Crash:
  $ clang -c    --coverage t.cpp

  All DICompileUnits must be listed in llvm.dbg.cu
  clang: ..../llvm/lib/IR/Verifier.cpp:4432:
  virtual bool {anonymous}::VerifierLegacyPass::doFinalization(llvm::Module&):
  Assertion `!V->hasBrokenDebugInfo() && "Module contains invalid debug info"'
  failed.
  #0 0x0000000001c81da5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) ...
        ...
  clang: error: clang frontend command failed due to signal
                (use -v to see invocation) clang version 4.0.0 (trunk 281550)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
        ...


I looked into the history of this ICE.

  Prior to r264657, the compiler finishes normally (return code 0).


  Starting at r264657, the compiler produces the message:
    All DICompileUnits must be listed in llvm.dbg.cu
  and exits with a fatal error.


  Starting at r281508, the compiler still produces the message:
    All DICompileUnits must be listed in llvm.dbg.cu
  and also triggers the Verifier.cpp failure:
    "Module contains invalid debug info"
  and then produces the stack dump.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161014/81e75178/attachment.html>


More information about the llvm-bugs mailing list