[llvm-bugs] [Bug 42928] New: SEGV when compiling tests from cppcoro

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 7 21:35:05 PDT 2019


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

            Bug ID: 42928
           Summary: SEGV when compiling tests from cppcoro
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nazvyacheslav at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Created attachment 22358
  --> https://bugs.llvm.org/attachment.cgi?id=22358&action=edit
diagnostics

Compiling test/recursive_generator_tests.cpp
test/recursive_generator_tests.cpp:156:2: warning: control reaches end of
non-void lambda [-Wreturn-type]
        };
        ^
test/recursive_generator_tests.cpp:160:11: note: in instantiation of function
template specialization '_DOCTEST_ANON_FUNC_16()::(anonymous
class)::operator()<(lambda at test/recursive_generator_tests.cpp:148:11)>'
requested here
                return f(n, f);
                        ^
test/recursive_generator_tests.cpp:237:2: warning: control may reach end of
non-void lambda [-Wreturn-type]
        };
        ^
test/recursive_generator_tests.cpp:239:14: note: in instantiation of function
template specialization '_DOCTEST_ANON_FUNC_20()::(anonymous
class)::operator()<(lambda at test/recursive_generator_tests.cpp:219:11) &>'
requested here
        auto gen = f(0, f);
                    ^
test/recursive_generator_tests.cpp:297:2: warning: control may reach end of
non-void lambda [-Wreturn-type]
        };
        ^
test/recursive_generator_tests.cpp:299:14: note: in instantiation of function
template specialization '_DOCTEST_ANON_FUNC_22()::(anonymous
class)::operator()<(lambda at test/recursive_generator_tests.cpp:252:11) &>'
requested here
        auto gen = f(1, f);
                    ^
Stack dump:
0.      Program arguments: /home/yozhek/llvm-build/bin/clang-9 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name recursive_generator_tests.cpp
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -coverage-notes-file
/home/yozhek/cppcoro/build/linux_x64_clang9.0.0_optimised/test/obj/recursive_generator_tests.gcno
-resource-dir /home/yozhek/llvm-build/lib/clang/9.0.0 -dependency-file
/tmp/CakeGccDepRtzNfv -MT
build/linux_x64_clang9.0.0_optimised/test/obj/recursive_generator_tests.o
-sys-header-deps -D CPPCORO_RELEASE_OPTIMISED -I ./include -internal-isystem
/home/yozhek/llvm-build/bin/../include/c++/v1 -internal-isystem
/usr/local/include -internal-isystem
/home/yozhek/llvm-build/lib/clang/9.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -std=c++1z -fdeprecated-macro
-fdebug-compilation-dir /home/yozhek/cppcoro -ferror-limit 19 -fmessage-length
0 -fcoroutines-ts -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -o
build/linux_x64_clang9.0.0_optimised/test/obj/recursive_generator_tests.o -x
c++ test/recursive_generator_tests.cpp 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      test/recursive_generator_tests.cpp:148:11: Generating code for
declaration '_DOCTEST_ANON_FUNC_16()::(anonymous class)::operator()'
 #0 0x0000562dafb1beea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/yozhek/llvm-project/llvm/lib/Support/Unix/Signals.inc:537:0
 #1 0x0000562dafb19e04 llvm::sys::RunSignalHandlers()
/home/yozhek/llvm-project/llvm/lib/Support/Signals.cpp:68:0
 #2 0x0000562dafb19f42 SignalHandler(int)
/home/yozhek/llvm-project/llvm/lib/Support/Unix/Signals.inc:385:0
 #3 0x00007f5f1443f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x0000562db19fb615 clang::Expr::getExprLoc() const
/home/yozhek/llvm-project/clang/lib/AST/Expr.cpp:216:0
 #5 0x0000562dafd36a67
clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(clang::CodeGen::CodeGenFunction&,
clang::Expr const*)
/home/yozhek/llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp:123:0
 #6 0x0000562daff7c06d clang::Stmt::getStmtClass() const
/home/yozhek/llvm-project/clang/include/clang/AST/Stmt.h:1088:0
 #7 0x0000562daff7c06d clang::BinaryOperator::classof(clang::Stmt const*)
/home/yozhek/llvm-project/clang/include/clang/AST/Expr.h:3564:0
 #8 0x0000562daff7c06d llvm::isa_impl<clang::BinaryOperator, clang::Stmt,
void>::doit(clang::Stmt const&)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:58:0
 #9 0x0000562daff7c06d llvm::isa_impl_cl<clang::BinaryOperator, clang::Stmt
const*>::doit(clang::Stmt const*)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:106:0
#10 0x0000562daff7c06d llvm::isa_impl_wrap<clang::BinaryOperator, clang::Stmt
const*, clang::Stmt const*>::doit(clang::Stmt const* const&)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:132:0
#11 0x0000562daff7c06d llvm::isa_impl_wrap<clang::BinaryOperator, clang::Stmt*
const, clang::Stmt const*>::doit(clang::Stmt* const&)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:124:0
#12 0x0000562daff7c06d bool llvm::isa<clang::BinaryOperator,
clang::Stmt*>(clang::Stmt* const&)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:143:0
#13 0x0000562daff7c06d llvm::cast_retty<clang::BinaryOperator,
clang::Stmt*>::ret_type llvm::dyn_cast<clang::BinaryOperator,
clang::Stmt>(clang::Stmt*)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Casting.h:343:0
#14 0x0000562daff7c06d Visit
/home/yozhek/llvm-project/clang/include/clang/AST/StmtVisitor.h:46:0
#15 0x0000562daff7c06d (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
/home/yozhek/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:424:0
#16 0x0000562daff7e4b0
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
/home/yozhek/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:4437:0
#17 0x0000562daff0e766 clang::CoroutineBodyStmt::getReturnStmtOnAllocFailure()
const /home/yozhek/llvm-project/clang/include/clang/AST/StmtCXX.h:415:0
#18 0x0000562daff0e766
clang::CodeGen::CodeGenFunction::EmitCoroutineBody(clang::CoroutineBodyStmt
const&) /home/yozhek/llvm-project/clang/lib/CodeGen/CGCoroutine.cpp:572:0
#19 0x0000562dafd6a935 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
/home/yozhek/llvm-project/clang/lib/CodeGen/CGStmt.cpp:151:0
#20 0x0000562dafdacd8e clang::CodeGen::CodeGenFunction::getLangOpts() const
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenFunction.h:1630:0
#21 0x0000562dafdacd8e
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1208:0
#22 0x0000562dafde95f9
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4320:0
#23 0x0000562dafde73a4
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2749:0
#24 0x0000562dafded21a clang::CodeGen::CodeGenModule::EmitDeferred()
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2123:0
#25 0x0000562dafded27c clang::CodeGen::CodeGenModule::EmitDeferred()
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2091:0
#26 0x0000562dafded27c clang::CodeGen::CodeGenModule::EmitDeferred()
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2091:0
#27 0x0000562dafded2f8 clang::CodeGen::CodeGenModule::Release()
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:394:0
#28 0x0000562db06c22d7 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&)
/home/yozhek/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:260:0
#29 0x0000562db06c124d
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:240:0
#30 0x0000562db10afb19 clang::ParseAST(clang::Sema&, bool, bool)
/home/yozhek/llvm-project/clang/lib/Parse/ParseAST.cpp:171:0
#31 0x0000562db06be7a7 clang::CodeGenAction::ExecuteAction()
/home/yozhek/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1060:0
#32 0x0000562db019d529 clang::FrontendAction::Execute()
/home/yozhek/llvm-project/clang/lib/Frontend/FrontendAction.cpp:934:0
#33 0x0000562db016343b llvm::Error::setChecked(bool)
/home/yozhek/llvm-project/llvm/include/llvm/Support/Error.h:300:0
#34 0x0000562db016343b llvm::Error::operator bool()
/home/yozhek/llvm-project/llvm/include/llvm/Support/Error.h:236:0
#35 0x0000562db016343b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/yozhek/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:944:0
#36 0x0000562db0255a53
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/yozhek/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:292:0
#37 0x0000562dae1b94f3 llvm::TimeTraceScope::~TimeTraceScope()
/home/yozhek/llvm-project/llvm/include/llvm/Support/TimeProfiler.h:69:0
#38 0x0000562dae1b94f3 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/yozhek/llvm-project/clang/tools/driver/cc1_main.cpp:248:0
#39 0x0000562dae123952 ExecuteCC1Tool
/home/yozhek/llvm-project/clang/tools/driver/driver.cpp:309:0
#40 0x0000562dae123952 main
/home/yozhek/llvm-project/clang/tools/driver/driver.cpp:381:0
#41 0x00007f5f130d3b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#42 0x0000562dae1b705a _start (/home/yozhek/llvm-build/bin/clang-9+0xca605a)
clang-9: error: unable to execute command: Segmentation fault (core dumped)
clang-9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0 (https://github.com/llvm/llvm-project
fa658316f63d59b099ccbe8605e23d2a7acea02c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/yozhek/llvm-build/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-9: note: diagnostic msg: 
********************

-- 
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/20190808/d3b0eec6/attachment-0001.html>


More information about the llvm-bugs mailing list