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-2241] Segmentation fault 11 using observeValue #44848

Open
swift-ci opened this issue Aug 1, 2016 · 4 comments
Open

[SR-2241] Segmentation fault 11 using observeValue #44848

swift-ci opened this issue Aug 1, 2016 · 4 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software PrintAsClang Area → compiler: The PrintAsClang library

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Aug 1, 2016

Previous ID SR-2241
Radar None
Original Reporter clane47 (JIRA User)
Type Bug
Environment

iMac ( 27 inch, Late 2012)
core i7 processor w/ 32GB ram
macOS Sierra 10.12 Beta (16A254g)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, PrintAsObjC
Assignee @jckarter
Priority Medium

md5: bff6c6663d4a3ebc6a32c42b59ea0a80

relates to:

  • SR-2227 Cannot conform to ObjC protocols with NSDictionary as argument

Issue Description:

The following causes a segmentation fault 11 at build time using Xcode Beta 3 and toolchain 07/29/16 :

override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { }

I haven't found a work-around.

@belkadan
Copy link
Contributor

belkadan commented Aug 1, 2016

Very likely the same as SR-2227. Do you have the crash log?

@swift-ci
Copy link
Collaborator Author

swift-ci commented Aug 1, 2016

Comment by Charles Lane (JIRA)

Here's the crash log:

MergeSwiftModule normal x86_64 /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4.swiftmodule
cd /Users/charleslane/Documents/SWDevelopment/SwiftStuff/Hacking With Swift/Project4
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a.xctoolchain/usr/bin/swift -frontend -emit-module /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/ViewControllerpartial.swiftmodule /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/AppDelegatepartial.swiftmodule -parse-as-library -target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator -F /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/charleslane/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-generated-files.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-own-target-headers.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-all-target-headers.hmap -Xcc -iquote -Xcc /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-project-headers.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/DerivedSources/x86_64 -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/DerivedSources -Xcc -DDEBUG=1 -Xcc "-working-directory/Users/charleslane/Documents/SWDevelopment/SwiftStuff/Hacking With Swift/Project4" -emit-module-doc-path /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4.swiftdoc -module-name Project4 -emit-objc-header-path /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4-Swift.h -o /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4.swiftmodule

0 swift 0x0000000103409c7b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x0000000103408ec6 llvm::sys::RunSignalHandlers() + 70
2 swift 0x000000010340a3cf SignalHandler(int) + 383
3 libsystem_platform.dylib 0x0000000105c22d7a _sigtramp + 26
4 libsystem_platform.dylib 0x000000000000001f _sigtramp + 4198355647
5 swift 0x0000000100bfacd0 (anonymous namespace)::ObjCPrinter::print(swift::Type, llvm::Optionalswift::OptionalTypeKind, swift::Identifier) + 208
6 swift 0x0000000100c002f7 (anonymous namespace)::ObjCPrinter::printCollectionElement(swift::Type) + 279
7 swift 0x0000000100bfffd6 (anonymous namespace)::ObjCPrinter::printObjCBridgeableType(swift::NominalTypeDecl const*, swift::ClassDecl const*, llvm::ArrayRefswift::Type, llvm::Optionalswift::OptionalTypeKind) + 550
8 swift 0x0000000100bfb74d swift::TypeVisitor<(anonymous namespace)::ObjCPrinter, void, llvm::Optionalswift::OptionalTypeKind >::visit(swift::Type, llvm::Optionalswift::OptionalTypeKind) + 1725
9 swift 0x0000000100bfba26 swift::TypeVisitor<(anonymous namespace)::ObjCPrinter, void, llvm::Optionalswift::OptionalTypeKind >::visit(swift::Type, llvm::Optionalswift::OptionalTypeKind) + 2454
10 swift 0x0000000100c00746 (anonymous namespace)::ObjCPrinter::visitBoundGenericType(swift::BoundGenericType*, llvm::Optionalswift::OptionalTypeKind) + 182
11 swift 0x0000000100bfba4e swift::TypeVisitor<(anonymous namespace)::ObjCPrinter, void, llvm::Optionalswift::OptionalTypeKind >::visit(swift::Type, llvm::Optionalswift::OptionalTypeKind) + 2494
12 swift 0x0000000100bfb88e swift::TypeVisitor<(anonymous namespace)::ObjCPrinter, void, llvm::Optionalswift::OptionalTypeKind >::visit(swift::Type, llvm::Optionalswift::OptionalTypeKind) + 2046
13 swift 0x0000000100bfacd0 (anonymous namespace)::ObjCPrinter::print(swift::Type, llvm::Optionalswift::OptionalTypeKind, swift::Identifier) + 208
14 swift 0x0000000100c068c6 (anonymous namespace)::ObjCPrinter::printAbstractFunctionAsMethod(swift::AbstractFunctionDecl*, bool, bool) + 2118
15 swift 0x0000000100c05cd2 (anonymous namespace)::ObjCPrinter::printMembers(swift::IteratorRangeswift::DeclIterator) + 338
16 swift 0x0000000100c04640 swift::ASTVisitor<(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void>::visit(swift::Decl*) + 4768
17 swift 0x0000000100bf6c74 swift::printAsObjC(llvm::raw_ostream&, swift::ModuleDecl*, llvm::StringRef, swift::Accessibility) + 1700
18 swift 0x0000000100762afe printAsObjC(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, swift::ModuleDecl*, llvm::StringRef, bool) + 462
19 swift 0x000000010076162a performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 14746
20 swift 0x000000010075c9bf swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2895
21 swift 0x000000010071f390 main + 2448
22 libdyld.dylib 0x00000001058fc255 start + 1
Stack dump:
0. Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a.xctoolchain/usr/bin/swift -frontend -emit-module /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/ViewControllerpartial.swiftmodule /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/AppDelegatepartial.swiftmodule -parse-as-library -target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator -F /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/charleslane/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-generated-files.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-own-target-headers.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-all-target-headers.hmap -Xcc -iquote -Xcc /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Project4-project-headers.hmap -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/DerivedSources/x86_64 -Xcc -I/Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/charleslane/Documents/SWDevelopment/SwiftStuff/Hacking With Swift/Project4 -emit-module-doc-path /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4.swiftdoc -module-name Project4 -emit-objc-header-path /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4-Swift.h -o /Users/charleslane/Library/Developer/Xcode/DerivedData/Project4-blkoahqgddncnrhbrufozusvyhyc/Build/Intermediates/Project4.build/Debug-iphonesimulator/Project4.build/Objects-normal/x86_64/Project4.swiftmodule

  1. While generating Objective-C header
  2. While printing 'ViewController' at
  3. While printing type '[NSKeyValueChangeKey : Any]?'
  4. While printing NULL type!

@belkadan
Copy link
Contributor

belkadan commented Aug 1, 2016

Okay, very similar but possibly not exactly the same. cc @jckarter

@Dante-Broggi
Copy link
Contributor

Has this been fixed? If so, this should be closed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software PrintAsClang Area → compiler: The PrintAsClang library
Projects
None yet
Development

No branches or pull requests

4 participants