Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Crash compiling CMark using Swift's branch of Clang #40030

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR41060
Status NEW
Importance P normal
Reported by Jordan Rose (jrose@belkadan.com)
Reported on 2019-03-13 15:24:41 -0700
Last modified on 2019-03-13 16:17:47 -0700
Version unspecified
Hardware All All
CC dexonsmith@apple.com, ghoflehner@apple.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

(filing on behalf of Marcin Krzyzanowski)

A recent Swift snapshot of Clang crashes when building CMark; repro script and preprocessed files attached to https://bugs.swift.org/browse/SR-10090.

(Admittedly Swift's copy of Clang is going to have branched a while ago, but it's still possible this hasn't been fixed. If it has, we'll track down the fix and cherry-pick it.)

Quuxplusone commented 5 years ago
Assertion failed: (FieldInfo.count(FD) && "Invalid field for record!"),
function getLLVMFieldNo, file /Users/buildnode/jenkins/workspace/oss-swift-
package-osx/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h, line 187.
Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-
2019-03-04-a.xctoolchain/usr/bin/clang-7 -cc1 -triple x86_64-apple-
macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -
emit-obj -mrelax-all -disable-free -main-file-name render.c -mrelocation-model
pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-
tables -faligned-alloc-unavailable -target-sdk-version=10.14 -target-cpu core2 -
dwarf-column-info -dwarf-ext-refs -fmodule-format=obj -debug-info-
kind=standalone -dwarf-version=4 -debugger-tuning=lldb -ggnu-pubnames -target-
linker-version 450.3 -fprofile-instrument=clang -fcoverage-mapping -coverage-
notes-file
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Objects-
normal/x86_64/render.gcno -resource-dir /Library/Developer/Toolchains/swift-
DEVELOPMENT-SNAPSHOT-2019-03-04-a.xctoolchain/usr/lib/clang/7.0.0 -index-store-
path /Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Index/DataStore -
dependency-file
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Objects-
normal/x86_64/render.d -MT dependencies -isysroot /Applications/Xcode-
beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-iquote
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Down-
generated-files.hmap -ivfsoverlay
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/all-
product-headers.yaml -iquote
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Down-
project-headers.hmap -D DEBUG=1 -I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Down-
own-target-headers.hmap -I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Down-
all-non-framework-target-headers.hmap -I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Products/Debug/include
-I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/DerivedSources-
normal/x86_64 -I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/DerivedSources/x86_64
-I
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/DerivedSources
-F/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Products/Debug -
O0 -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -
Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-
isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -
Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -
Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-
unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-
conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-
conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-
to-32 -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Wno-sign-
conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-
prototypes -Wno-semicolon-before-method-body -w -std=gnu99 -fdebug-compilation-
dir /Users/marcinkrzyzanowski/Devel/Down -ferror-limit 19 -fmacro-backtrace-
limit 0 -fmessage-length 0 -stack-protector 1 -fblocks -fencode-extended-block-
signature -fmodules -fimplicit-module-maps -fmodules-cache-
path=/Users/marcinkrzyzanowski/Devel/Down/DerivedData/ModuleCache.noindex -
fmodule-name=Down -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -
fbuild-session-timestamp=1552421177331407683 -fmodules-validate-once-per-build-
session -fmodules-validate-system-headers -fregister-global-dtors-with-atexit -
fobjc-runtime=macosx-10.11.0 -fpascal-strings -fmax-type-align=16 -fno-common -
fdiagnostics-show-option -fdiagnostics-show-note-include-stack -fasm-blocks -
serialize-diagnostic-file
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Objects-
normal/x86_64/render.dia -o
/Users/marcinkrzyzanowski/Devel/Down/DerivedData/Down/Build/Intermediates.noindex/Down.build/Debug/Down.build/Objects-
normal/x86_64/render.o -x c
/Users/marcinkrzyzanowski/Devel/Down/Source/cmark/render.c
1.  <eof> parser at end of file
2.  Per-file LLVM IR generation
3.  /Users/marcinkrzyzanowski/Devel/Down/Source/cmark/node.h:84:32: Generating
code for declaration 'cmark_node_mem'
0  clang-7                  0x000000010a81eef5
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang-7                  0x000000010a81e195 llvm::sys::RunSignalHandlers() +
85
2  clang-7                  0x000000010a81f4e8 SignalHandler(int) + 264
3  libsystem_platform.dylib 0x00007fff616edb3d _sigtramp + 29
4  clang-7                  0x000000010d56b108
llvm::DenseMapInfo<llvm::codeview::GloballyHashedType>::Tombstone + 126776
5  libsystem_c.dylib        0x00007fff615ab1c9 abort + 127
6  libsystem_c.dylib        0x00007fff61573868 basename_r + 0
7  clang-7                  0x000000010ac2b576
clang::CodeGen::CGRecordLayout::getLLVMFieldNo(clang::FieldDecl const*) const +
294
8  clang-7                  0x000000010ab5b1de
emitAddrOfFieldStorage(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::Address, clang::FieldDecl const*) + 110
9  clang-7                  0x000000010ab47419
clang::CodeGen::CodeGenFunction::EmitLValueForField(clang::CodeGen::LValue,
clang::FieldDecl const*) + 1337
10 clang-7                  0x000000010ab518c3
clang::CodeGen::CodeGenFunction::EmitMemberExpr(clang::MemberExpr const*) + 1075
11 clang-7                  0x000000010ab44401
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 1185
12 clang-7                  0x000000010ab4bc3c
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) + 172
13 clang-7                  0x000000010ab9188a (anonymous
namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) + 42
14 clang-7                  0x000000010ab8e6ba
clang::StmtVisitorBase<std::__1::add_pointer, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 15642
15 clang-7                  0x000000010ab94604 (anonymous
namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 2244
16 clang-7                  0x000000010ab82f48
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 104
17 clang-7                  0x000000010ac60fe3
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) + 1411
18 clang-7                  0x000000010ac5e123
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*,
llvm::ArrayRef<clang::Attr const*>) + 1171
19 clang-7                  0x000000010ac664a0
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 96
20 clang-7                  0x000000010aca5503
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 787
21 clang-7                  0x000000010acbd256
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 486
22 clang-7                  0x000000010acb79d8
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 408
23 clang-7                  0x000000010acaf751
clang::CodeGen::CodeGenModule::EmitDeferred() + 289
24 clang-7                  0x000000010acaeacc
clang::CodeGen::CodeGenModule::Release() + 28
25 clang-7                  0x000000010ad40ae4 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 100
26 clang-7                  0x000000010ac9bc38
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 120
27 clang-7                  0x000000010af3f91c
clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44
28 clang-7                  0x000000010ba6a773 clang::ParseAST(clang::Sema&,
bool, bool) + 531
29 clang-7                  0x000000010af0ac1e clang::FrontendAction::Execute()
+ 78
30 clang-7                  0x000000010aebc841
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1489
31 clang-7                  0x000000010af61479
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1945
32 clang-7                  0x00000001093033cb cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1403