<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Clang crashes with -fcoverage-mapping"
   href="https://bugs.llvm.org/show_bug.cgi?id=41621">41621</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crashes with -fcoverage-mapping
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rtrieu@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat test.ii
void a() {}

$ clang -cc1 -emit-obj -fcoverage-mapping test.ii
Stack dump:
0.      Program arguments: clang -cc1 -emit-obj -fcoverage-mapping test.ii 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
 #0 0x0000000001efdde4 PrintStackTraceSignalHandler(void*)
(/usr/local/bin/clang-9+0x1efdde4)
 #1 0x0000000001efbd1e llvm::sys::RunSignalHandlers()
(/usr/local/bin/clang-9+0x1efbd1e)
 #2 0x0000000001efe1d8 SignalHandler(int) (/usr/local/bin/clang-9+0x1efe1d8)
 #3 0x00007f3c0a53e0c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
 #4 0x00000000019b3e13 llvm::ConstantExpr::getBitCast(llvm::Constant*,
llvm::Type*, bool) (/usr/local/bin/clang-9+0x19b3e13)
 #5 0x0000000002163af8
clang::CodeGen::CoverageMappingModuleGen::addFunctionMappingRecord(llvm::GlobalVariable*,
llvm::StringRef, unsigned long, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/usr/local/bin/clang-9+0x2163af8)
 #6 0x00000000021496c4
clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(clang::Decl const*,
llvm::StringRef, llvm::GlobalValue::LinkageTypes)
(/usr/local/bin/clang-9+0x21496c4)
 #7 0x0000000002114309
clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings()
(/usr/local/bin/clang-9+0x2114309)
 #8 0x0000000002112747 clang::CodeGen::CodeGenModule::Release()
(/usr/local/bin/clang-9+0x2112747)
 #9 0x00000000029dfd64 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang-9+0x29dfd64)
#10 0x00000000029dd457
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang-9+0x29dd457)
#11 0x000000000316b583 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-9+0x316b583)
#12 0x00000000024fe037 clang::FrontendAction::Execute()
(/usr/local/bin/clang-9+0x24fe037)
#13 0x00000000024a66b8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/clang-9+0x24a66b8)
#14 0x000000000258f7a5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/clang-9+0x258f7a5)
#15 0x0000000000977d8c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang-9+0x977d8c)
#16 0x00000000009760a9 main (/usr/local/bin/clang-9+0x9760a9)
#17 0x00007f3c090b62b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#18 0x00000000009735fa _start (/usr/local/bin/clang-9+0x9735fa)
Segmentation fault</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>