[llvm-bugs] [Bug 41621] New: Clang crashes with -fcoverage-mapping

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 26 18:54:28 PDT 2019


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

            Bug ID: 41621
           Summary: Clang crashes with -fcoverage-mapping
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rtrieu at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

$ 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

-- 
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/20190427/65e2cf80/attachment-0001.html>


More information about the llvm-bugs mailing list