-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwarerun-time crashBug → crash: Swift code crashed during executionBug → crash: Swift code crashed during execution
Description
Previous ID | SR-10446 |
Radar | None |
Original Reporter | @stephencelis |
Type | Bug |
Status | Resolved |
Resolution | Duplicate |
Environment
Xcode 10.2 / Swift 5
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, RunTimeCrash |
Assignee | None |
Priority | Medium |
md5: 4590729a9a2c64ced4e50c8676d31cb5
duplicates:
- SR-10117 EXC_BAD_INSTRUCTION in playground
Issue Description:
If you create a playground where the entire contents is:
\String.count
You get a crash:
Fatal error: load from misaligned raw pointer
Playground execution failed:
error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
* thread #​1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
* frame #​0: 0x00007fff6c5b3483 libswiftCore.dylib`function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage(_: Swift.StaticString, _: Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 307
frame #​1: 0x00007fff6c4b191a libswiftCore.dylib`generic specialization <Swift.GetKeyPathClassAndInstanceSizeFromPattern> of Swift._walkKeyPathPattern<A where A: Swift.KeyPathPatternVisitor>(_: Swift.UnsafeRawPointer, walker: inout A) -> () + 1370
frame #​2: 0x00007fff6c4b0d34 libswiftCore.dylib`Swift._getKeyPathClassAndInstanceSizeFromPattern(Swift.UnsafeRawPointer, Swift.UnsafeRawPointer) -> (keyPathClass: Swift.AnyKeyPath.Type, rootType: Any.Type, size: Swift.Int, alignmentMask: Swift.Int) + 100
frame #​3: 0x00007fff6c4b0ae6 libswiftCore.dylib`Swift._swift_getKeyPath(pattern: Swift.UnsafeMutableRawPointer, arguments: Swift.UnsafeRawPointer) -> Swift.UnsafeRawPointer + 118
frame #​4: 0x00007fff6c4b0a69 libswiftCore.dylib`swift_getKeyPathImpl + 9
frame #​5: 0x000000010f178240 $__lldb_expr127`main at Untitled Page.xcplaygroundpage:4:1
frame #​6: 0x000000010c1471b0 com.apple.dt.Xcode.PlaygroundStub-macosx
frame #​7: 0x00007fff407cc02c CoreFoundation`__invoking___ + 140
frame #​8: 0x00007fff407cbeff CoreFoundation`-[NSInvocation invoke] + 311
frame #​9: 0x00007fff4082bd9d CoreFoundation`-[NSInvocation invokeWithTarget:] + 56
frame #​10: 0x00007fff685e5bba ViewBridge`__68-[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:]_block_invoke_2 + 46
frame #​11: 0x00007fff685af8c6 ViewBridge`-[NSViewServiceMarshal withHostWindowFrameAnimationInProgress:perform:] + 53
frame #​12: 0x00007fff685e5b83 ViewBridge`__68-[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:]_block_invoke + 112
frame #​13: 0x00007fff3ded7e4c AppKit`+[NSAnimationContext runAnimationGroup:] + 55
frame #​14: 0x00007fff3ded7e02 AppKit`+[NSAnimationContext runAnimationGroup:completionHandler:] + 82
frame #​15: 0x00007fff68605904 ViewBridge`runAnimationGroup + 295
frame #​16: 0x00007fff685e56de ViewBridge`+[NSVB_View _animateWithAttributes:animations:completion:] + 490
frame #​17: 0x00007fff685e5aee ViewBridge`-[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 206
frame #​18: 0x00007fff40814e2e CoreFoundation`___forwarding___ + 780
frame #​19: 0x00007fff40814a98 CoreFoundation`__forwarding_prep_0___ + 120
frame #​20: 0x00007fff407cc02c CoreFoundation`__invoking___ + 140
frame #​21: 0x00007fff407cbeff CoreFoundation`-[NSInvocation invoke] + 311
frame #​22: 0x00007fff4082bd9d CoreFoundation`-[NSInvocation invokeWithTarget:] + 56
frame #​23: 0x00007fff685b2088 ViewBridge`-[NSVB_QueueingProxy forwardInvocation:] + 324
frame #​24: 0x00007fff40814e2e CoreFoundation`___forwarding___ + 780
frame #​25: 0x00007fff40814a98 CoreFoundation`__forwarding_prep_0___ + 120
frame #​26: 0x00007fff407cc02c CoreFoundation`__invoking___ + 140
frame #​27: 0x00007fff407cbeff CoreFoundation`-[NSInvocation invoke] + 311
frame #​28: 0x00007fff4082bd9d CoreFoundation`-[NSInvocation invokeWithTarget:] + 56
frame #​29: 0x00007fff40814e2e CoreFoundation`___forwarding___ + 780
frame #​30: 0x00007fff40814a98 CoreFoundation`__forwarding_prep_0___ + 120
frame #​31: 0x00007fff407cc02c CoreFoundation`__invoking___ + 140
frame #​32: 0x00007fff407cbeff CoreFoundation`-[NSInvocation invoke] + 311
frame #​33: 0x00007fff68582082 ViewBridge`__deferNSXPCInvocationOntoMainThread_block_invoke + 228
frame #​34: 0x00007fff68577814 ViewBridge`__wrapBlockWithVoucher_block_invoke + 37
frame #​35: 0x00007fff685775c1 ViewBridge`__deferBlockOntoMainThread_block_invoke_2 + 584
frame #​36: 0x00007fff407f96c4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
frame #​37: 0x00007fff407bcdd7 CoreFoundation`__CFRunLoopDoBlocks + 394
frame #​38: 0x00007fff407bc4f6 CoreFoundation`__CFRunLoopRun + 1174
frame #​39: 0x00007fff407bbe0e CoreFoundation`CFRunLoopRunSpecific + 455
frame #​40: 0x00007fff3faa89db HIToolbox`RunCurrentEventLoopInMode + 292
frame #​41: 0x00007fff3faa861d HIToolbox`ReceiveNextEventCommon + 355
frame #​42: 0x00007fff3faa84a6 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
frame #​43: 0x00007fff3de42ffb AppKit`_DPSNextEvent + 965
frame #​44: 0x00007fff3de41d93 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
frame #​45: 0x00007fff6857fc43 ViewBridge`-[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 99
frame #​46: 0x00007fff3de3beb0 AppKit`-[NSApplication run] + 699
frame #​47: 0x00007fff3de2b3f0 AppKit`NSApplicationMain + 777
frame #​48: 0x00007fff6ce68213 libxpc.dylib`_xpc_objc_main + 612
frame #​49: 0x00007fff6ce67cd9 libxpc.dylib`xpc_main + 433
frame #​50: 0x00007fff685717f0 ViewBridge`-[NSXPCSharedListener resume] + 16
frame #​51: 0x00007fff6857a5bc ViewBridge`NSViewServiceApplicationMain + 2830
frame #​52: 0x000000010c1471da com.apple.dt.Xcode.PlaygroundStub-macosx`main + 42
frame #​53: 0x00007fff6cc353d5 libdyld.dylib`start + 1
frame #​54: 0x00007fff6cc353d5 libdyld.dylib`start + 1
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwarerun-time crashBug → crash: Swift code crashed during executionBug → crash: Swift code crashed during execution