[llvm-bugs] [Bug 44914] New: Seg fault while compiling Boost Beast trivial example

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 14 08:42:13 PST 2020


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

            Bug ID: 44914
           Summary: Seg fault while compiling Boost Beast trivial example
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: planetmarshalluk at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 23129
  --> https://bugs.llvm.org/attachment.cgi?id=23129&action=edit
Diagnostic message

```
Stack dump:
0.      Program arguments: /usr/lib/llvm-9/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level
2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debug-info-kind=standalone -dwarf-version=4
-debugger-tuning=gdb -coverage-notes-file
/home/andrew/projects/fuel3d/fuel3d/cmake-build-debug/app/reconstruct_service/CMakeFiles/reconstruct_service.dir/main.cpp.gcno
-resource-dir /usr/lib/llvm-9/lib/clang/9.0.0 -isystem
/home/andrew/.conan/data/boost/1.72.0/fuel3d/stable/package/7cce9bc97b897aed479f1c78941c8ec0bd77c608/include
-isystem
/home/andrew/.conan/data/zlib/1.2.11/_/_/package/961755854760682044d37dabfc2d998658edf961/include
-isystem
/home/andrew/.conan/data/bzip2/1.0.8/_/_/package/d91c5078b0c5af8e17bc80e2389019770a579bcc/include
-isystem
/home/andrew/.conan/data/msgpack/3.2.0/fuel3d/stable/package/961755854760682044d37dabfc2d998658edf961/include
-isystem
/home/andrew/.conan/data/fmt/5.3.0/fuel3d/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include
-D BOOST_ALL_DYN_LINK -D BOOST_ALL_NO_LIB -D
F3D_DATA_PATH="/home/andrew/F3DUnitData" -D
F3D_REGRESSION_DATA_PATH="/home/andrew/F3DRegressionData" -D FMT_HEADER_ONLY -D
WITH_FMT_ALIAS -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm-9/lib/clang/9.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wall -Wextra -Wconversion -pedantic
-std=c++17 -fdeprecated-macro -fdebug-compilation-dir
/home/andrew/projects/fuel3d/fuel3d/cmake-build-debug/app/reconstruct_service
-ferror-limit 19 -fmessage-length 0 -fopenmp -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-faddrsig -o CMakeFiles/reconstruct_service.dir/main.cpp.o -x c++
/home/andrew/projects/fuel3d/fuel3d/app/reconstruct_service/main.cpp 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.     
/home/andrew/.conan/data/boost/1.72.0/fuel3d/stable/package/7cce9bc97b897aed479f1c78941c8ec0bd77c608/include/boost/beast/http/detail/rfc7230.ipp:80:1:
Generating code for declaration 'boost::beast::http::detail::is_token_char'
 #0 0x00007f1ad195035f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa3835f)
 #1 0x00007f1ad194e780 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa36780)
 #2 0x00007f1ad1950761 (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xa38761)
 #3 0x00007f1ad75d5890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f1ad1a8d9a2 llvm::PointerType::get(llvm::Type*, unsigned int)
(/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xb759a2)
 #5 0x00007f1ad6371afa getType
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/Value.h:244:34
 #6 0x00007f1ad6371afa getGEPReturnType
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/Instructions.h:1046:14
 #7 0x00007f1ad6371a4c GetElementPtrInst
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/Instructions.h:1113:66
 #8 0x00007f1ad6371a4c Create
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/Instructions.h:913:25
 #9 0x00007f1ad63f103a CreateInBounds
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/Instructions.h:947:9
#10 0x00007f1ad63f103a CreateInBoundsGEP
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/IRBuilder.h:1713:19
#11 0x00007f1ad6473afc CreateInBoundsGEP
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/IR/IRBuilder.h:1698:12
#12 0x00007f1ad6473afc
clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, bool, bool, clang::SourceLocation, llvm::Twine
const&)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExprScalar.cpp:4542:27
#13 0x00007f1ad644347b emitArraySubscriptGEP
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExpr.cpp:3367:16
#14 0x00007f1ad644347b emitArraySubscriptGEP
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExpr.cpp:3425:14
#15 0x00007f1ad64364c5
clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(clang::ArraySubscriptExpr
const*, bool)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExpr.cpp:3570:12
#16 0x00007f1ad642db46 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr
const*)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExpr.cpp:1341:12
#17 0x00007f1ad6434f7a
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExpr.cpp:0:0
#18 0x00007f1ad64749da Visit
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/include/clang/AST/StmtVisitor.h:0:0
#19 0x00007f1ad647ec1b VisitCastExpr
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExprScalar.cpp:0:0
#20 0x00007f1ad646d30f Visit
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExprScalar.cpp:424:52
#21 0x00007f1ad646d30f
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGExprScalar.cpp:4436:8
#22 0x00007f1ad6553e2b
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGStmt.cpp:1101:27
#23 0x00007f1ad65515d7 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGStmt.cpp:144:32
#24 0x00007f1ad655a3fc
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CGStmt.cpp:390:22
#25 0x00007f1ad6594ee2
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenFunction.cpp:1036:1
#26 0x00007f1ad659570f getLangOpts
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenFunction.h:1630:51
#27 0x00007f1ad659570f
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenFunction.cpp:1208:7
#28 0x00007f1ad65acb8e
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:4320:3
#29 0x00007f1ad65a714f ~TimeTraceScope
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/Support/TimeProfiler.h:69:35
#30 0x00007f1ad65a714f
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2760:3
#31 0x00007f1ad659dda3 begin
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:573:45
#32 0x00007f1ad659dda3 empty
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:760:16
#33 0x00007f1ad659dda3 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2123:26
#34 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#35 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#36 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#37 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#38 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#39 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#40 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#41 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#42 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#43 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#44 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#45 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#46 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#47 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#48 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#49 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#50 0x00007f1ad659dd38 operator++
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:805:2
#51 0x00007f1ad659dd38 clang::CodeGen::CodeGenModule::EmitDeferred()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2091:22
#52 0x00007f1ad659d1d7 __normal_iterator
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:783:20
#53 0x00007f1ad659d1d7 begin
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:564:16
#54 0x00007f1ad659d1d7 EmitVTablesOpportunistically
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:2139:32
#55 0x00007f1ad659d1d7 clang::CodeGen::CodeGenModule::Release()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenModule.cpp:394:3
#56 0x00007f1ad6617264 HandleTranslationUnit
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/ModuleBuilder.cpp:260:11
#57 0x00007f1ad658dbb6 HandleTranslationUnit
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/CodeGen/CodeGenAction.cpp:240:13
#58 0x00007f1ad58bda03 __normal_iterator
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_iterator.h:783:20
#59 0x00007f1ad58bda03 begin
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_vector.h:564:16
#60 0x00007f1ad58bda03
finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback,
std::default_delete<clang::TemplateInstantiationCallback> >,
std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback,
std::default_delete<clang::TemplateInstantiationCallback> > > > >
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#61 0x00007f1ad58bda03 clang::ParseAST(clang::Sema&, bool, bool)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/Parse/ParseAST.cpp:178:3
#62 0x00007f1ad6b5f4c8 clang::FrontendAction::Execute()
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/Frontend/FrontendAction.cpp:938:10
#63 0x00007f1ad6b1ece0 getPtr
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/Support/Error.h:273:42
#64 0x00007f1ad6b1ece0 operator bool
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/include/llvm/Support/Error.h:236:16
#65 0x00007f1ad6b1ece0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/Frontend/CompilerInstance.cpp:944:23
#66 0x00007f1ad6bc2210
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/build/llvm-toolchain-9-uSl4bC/llvm-toolchain-9-9/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:291:25
#67 0x0000000000498a5b cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-9/bin/clang+0x498a5b)
#68 0x0000000000496d71 main (/usr/lib/llvm-9/bin/clang+0x496d71)
#69 0x00007f1ad0209b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#70 0x00000000004941ea _start (/usr/lib/llvm-9/bin/clang+0x4941ea)
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0-2~ubuntu18.04.2 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

```

-- 
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/20200214/44eac2cf/attachment-0001.html>


More information about the llvm-bugs mailing list