Skip to content
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

[SR-812] Crash in swift::irgen::emitBuiltinCall when compiling with -profile-generate -profile-coverage-mapping #43424

Closed
harlanhaskins opened this issue Feb 25, 2016 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code coverage Area → source tooling: code coverage compiler The Swift compiler in itself

Comments

@harlanhaskins
Copy link
Collaborator

Previous ID SR-812
Radar None
Original Reporter @harlanhaskins
Type Bug
Status Closed
Resolution Cannot Reproduce

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CodeCoverage
Assignee None
Priority Medium

md5: a8273740e0fe0151a65e6a706c4f7e1d

Issue Description:

Compiling the attached file seems to crash in swift::irgen::emitBuiltinCall.

Trace:

Assertion failed: (FuncNamePtr && "No function name pointer for counter update"), function emitBuiltinCall, file /Users/harlanhaskins/Documents/Swift/swift/swift/lib/IRGen/GenFunc.cpp, line 1821.
0  swift                    0x000000011029b12e llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1  swift                    0x000000011029b659 PrintStackTraceSignalHandler(void*) + 25
2  swift                    0x00000001102979e9 llvm::sys::RunSignalHandlers() + 425
3  swift                    0x000000011029bcf2 SignalHandler(int) + 354
4  libsystem_platform.dylib 0x00007fff98c0652a _sigtramp + 26
5  swift                    0x000000011b10c47d __llvm_profile_register_write_file_atexit.HasBeenRegistered + 426429
6  swift                    0x000000011029b67b raise + 27
7  swift                    0x000000011029b722 abort + 18
8  swift                    0x000000011029b70e __assert_rtn + 126
9  swift                    0x000000010a47cca1 swift::irgen::emitBuiltinCall(swift::irgen::IRGenFunction&, swift::Identifier, swift::SILType, swift::irgen::Explosion&, swift::irgen::Explosion&, llvm::ArrayRef<swift::Substitution>) + 3953
10 swift                    0x000000010a692a07 (anonymous namespace)::IRGenSILFunction::visitBuiltinInst(swift::BuiltinInst*) + 551
11 swift                    0x000000010a68a610 swift::SILVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::ValueBase*) + 3504
12 swift                    0x000000010a68635a swift::SILInstructionVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::SILInstruction*) + 58
13 swift                    0x000000010a67af74 (anonymous namespace)::IRGenSILFunction::visitSILBasicBlock(swift::SILBasicBlock*) + 5092
14 swift                    0x000000010a671a3f (anonymous namespace)::IRGenSILFunction::emitSILFunction() + 2415
15 swift                    0x000000010a671057 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 183
16 swift                    0x000000010a459c11 swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 1249
17 swift                    0x000000010a6183e7 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1015
18 swift                    0x000000010a6190c9 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 185
19 swift                    0x000000010a1e10a5 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 30437
20 swift                    0x000000010a1d88f8 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 20984
21 swift                    0x000000010a1b39da main + 6250
22 libdyld.dylib            0x00007fff9bbcd5ad start + 1
23 libdyld.dylib            0x000000000000000f start + 1682123363
Stack dump:
0.  Program arguments: /Users/harlanhaskins/Documents/Swift/swift/build/Ninja-DebugAssert+swift-DebugAssertCoverage/swift-macosx-x86_64/bin/swift -frontend -c -primary-file test.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -profile-generate -profile-coverage-mapping -color-diagnostics -module-name test -o /var/folders/_4/m85gwf413hn4bl1hwlyvc4wc0000gn/T/test-280fa7.o 
1.  While emitting IR SIL function @_TFC4test3Food for 'deinit' at test.swift:3:7
@Dante-Broggi
Copy link
Contributor

Is this resolved, or no longer valid? If either, this should be closed.

@harlanhaskins
Copy link
Collaborator Author

Thanks! This is fixed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. code coverage Area → source tooling: code coverage compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants