gnustep / libobjc2

Objective-C runtime library intended for use with Clang.
http://www.gnustep.org/
MIT License
434 stars 118 forks source link

clang crashing while building libobjc2 on TravisCI as part of gnustep-gui tests #72

Closed ivucica closed 6 years ago

ivucica commented 6 years ago

https://travis-ci.org/gnustep/libs-gui/builds/384499982

...
Scanning dependencies of target ForwardDeclareProtocolAccess_legacy
[ 11%] Building C object Test/CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/ForwardDeclareProtocolAccess.m.o
[ 11%] Building C object Test/CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/ForwardDeclareProtocol.m.o
#0 0x0000000001a615c4 PrintStackTraceSignalHandler(void*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1a615c4)
#1 0x0000000001a618a6 SignalHandler(int) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1a618a6)
#2 0x00002b27fd3f0330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x0000000001d5fd36 (anonymous namespace)::CGObjCGNU::GenerateProtocolRef(clang::CodeGen::CodeGenFunction&, clang::ObjCProtocolDecl const*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1d5fd36)
#4 0x0000000001d32ce2 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1d32ce2)
#5 0x0000000001bd9268 clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1bd9268)
#6 0x0000000001bd6cc8 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1bd6cc8)
#7 0x0000000001bdf63c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1bdf63c)
#8 0x0000000001c1176d clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&, clang::Stmt const*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1c1176d)
#9 0x0000000001c1204e clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1c1204e)
#10 0x0000000001c262e8 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1c262e8)
#11 0x0000000001c204db clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1c204db)
#12 0x0000000001c281b8 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1c281b8)
#13 0x00000000022a6a4f (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) (/usr/local/clang-5.0.0/bin/clang-5.0+0x22a6a4f)
#14 0x00000000022a40a2 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/usr/local/clang-5.0.0/bin/clang-5.0+0x22a40a2)
#15 0x00000000024d1d03 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/clang-5.0.0/bin/clang-5.0+0x24d1d03)
#16 0x0000000001f3605f clang::FrontendAction::Execute() (/usr/local/clang-5.0.0/bin/clang-5.0+0x1f3605f)
#17 0x0000000001ee55d8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1ee55d8)
#18 0x0000000001fb2d96 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x1fb2d96)
#19 0x00000000008a1862 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/clang-5.0.0/bin/clang-5.0+0x8a1862)
#20 0x000000000089f7f9 main (/usr/local/clang-5.0.0/bin/clang-5.0+0x89f7f9)
#21 0x00002b27fe68df45 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f45)
#22 0x000000000089c9e9 _start (/usr/local/clang-5.0.0/bin/clang-5.0+0x89c9e9)
Stack dump:
0.  Program arguments: /usr/local/clang-5.0.0/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name ForwardDeclareProtocol.m -mrelocation-model static -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=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/travis/dependency_source/libobjc2/build/Test/CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/ForwardDeclareProtocol.m.gcno -resource-dir /usr/local/clang-5.0.0/lib/clang/5.0.0 -D GC_DEBUG -D GNUSTEP -D NO_LEGACY -D OLDABI_COMPAT=1 -D TYPE_DEPENDENT_DISPATCH -D __OBJC_RUNTIME_INTERNAL__=1 -I /home/travis/dependency_source/libobjc2 -D NDEBUG -U NDEBUG -internal-isystem /usr/local/include -internal-isystem /usr/local/clang-5.0.0/lib/clang/5.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -std=gnu99 -fdebug-compilation-dir /home/travis/dependency_source/libobjc2/build/Test -ferror-limit 19 -fmessage-length 80 -fblocks -fobjc-runtime=gnustep-1.7 -fobjc-dispatch-method=non-legacy -fobjc-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/ForwardDeclareProtocol.m.o -x objective-c /home/travis/dependency_source/libobjc2/Test/ForwardDeclareProtocol.m 
1.  <eof> parser at end of file
2.  /home/travis/dependency_source/libobjc2/Test/ForwardDeclareProtocol.m:4:11: LLVM IR generation of declaration 'getProtocol'
3.  /home/travis/dependency_source/libobjc2/Test/ForwardDeclareProtocol.m:4:11: Generating code for declaration 'getProtocol'
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-5.0.0/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg: 
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/ForwardDeclareProtocol-32b509.m
clang-5.0: note: diagnostic msg: /tmp/ForwardDeclareProtocol-32b509.sh
clang-5.0: note: diagnostic msg: 
********************
make[2]: *** [Test/CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/ForwardDeclareProtocol.m.o] Error 254
make[1]: *** [Test/CMakeFiles/ForwardDeclareProtocolAccess_legacy.dir/all] Error 2
make: *** [all] Error 2
The command "./travis-deps.sh" failed and exited with 2 during .
Your build has been stopped.
davidchisnall commented 6 years ago

This is expected. See the other bug report about this issue. The regression tests for a clang crash is, unsurprisingly, crashing clang when you use an old version of clang. This is fixed in clang head.