Skip to content

Add a test for rdar://21775089, which is fixed now #1958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2016

Conversation

gribozavr
Copy link
Contributor

We used to go into infinite recursion in IRGen:

    frame #21776: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21777: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21778: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21779: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21780: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21781: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21782: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21783: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21784: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21785: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21786: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21787: 0x00000001000f5d3f swift`swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::ArrayRef<swift::Substitution>, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&) + 847
    frame #21788: 0x0000000100155f9e swift`(anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 1374
    frame #21789: 0x0000000100142211 swift`(anonymous namespace)::IRGenSILFunction::emitSILFunction() + 11889
    frame #21790: 0x000000010013f025 swift`swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 725
    frame #21791: 0x000000010008a67c swift`swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 412
    frame #21792: 0x00000001001257b7 swift`performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 855
    frame #21793: 0x0000000100125d16 swift`swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
    frame #21794: 0x000000010000d116 swift`performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 12070
    frame #21795: 0x0000000100009fce swift`frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2638
    frame #21796: 0x00000001000061d3 swift`main + 2131
    frame #21797: 0x00007fff9a29e5ad libdyld.dylib`start + 1
    frame #21798: 0x00007fff9a29e5ad libdyld.dylib`start + 1
(lldb) ^D

We used to go into infinite recursion in IRGen:

    frame #21776: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21777: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21778: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21779: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21780: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21781: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21782: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21783: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21784: 0x00000001000c0ed3 swift`emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 771
    frame #21785: 0x00000001000bf49b swift`llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 331
    frame #21786: 0x00000001000b3177 swift`swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 87
    frame #21787: 0x00000001000f5d3f swift`swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::ArrayRef<swift::Substitution>, swift::irgen::WitnessMetadata*, swift::irgen::Explosion&) + 847
    frame #21788: 0x0000000100155f9e swift`(anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 1374
    frame #21789: 0x0000000100142211 swift`(anonymous namespace)::IRGenSILFunction::emitSILFunction() + 11889
    frame #21790: 0x000000010013f025 swift`swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 725
    frame #21791: 0x000000010008a67c swift`swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 412
    frame #21792: 0x00000001001257b7 swift`performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 855
    frame #21793: 0x0000000100125d16 swift`swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
    frame #21794: 0x000000010000d116 swift`performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 12070
    frame #21795: 0x0000000100009fce swift`frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2638
    frame #21796: 0x00000001000061d3 swift`main + 2131
    frame #21797: 0x00007fff9a29e5ad libdyld.dylib`start + 1
    frame #21798: 0x00007fff9a29e5ad libdyld.dylib`start + 1
(lldb) ^D
@gribozavr
Copy link
Contributor Author

@swift-ci Please test and merge

@gribozavr gribozavr merged commit 15467ac into master Mar 30, 2016
@gribozavr gribozavr deleted the add-test-for-rdar21775089 branch March 30, 2016 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant