mattgallagher / CwlPreconditionTesting

A Mach exception handler that allows Swift precondition failures to be caught and tested.
ISC License
175 stars 46 forks source link

Darwin.framework in Xcode 11.4 is missing symbols #20

Closed sjmadsen closed 4 years ago

sjmadsen commented 4 years ago

Building a test project with Nimble and CwlPreconditionTesting on Xcode 11.4 (iOS 13 target) generates some new errors due to missing symbols:

public let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout<x86_thread_state64_t>.size / MemoryLayout<Int32>.size)
                                                          ^~~~~~~~~~~~~~~~~~~~
/Users/steve/Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift:63:47: error: use of unresolved identifier 'x86_thread_state64_t'
                var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee }
                                                            ^~~~~~~~~~~~~~~~~~~~
/Users/steve/Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift:82:35: error: use of unresolved identifier 'x86_thread_state64_t'
                new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state }
                                                ^~~~~~~~~~~~~~~~~~~~
/Users/steve/Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift:185:166: error: use of unresolved identifier 'x86_THREAD_STATE64'
                        thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, currentExceptionPtr, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr)
                                                                                                                                                                                          ^~~~~~~~~~~~~~~~~~
/Users/steve/Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift:44:59: error: use of undeclared type 'x86_thread_state64_t'
public let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout<x86_thread_state64_t>.size / MemoryLayout<Int32>.size)
                                                          ^~~~~~~~~~~~~~~~~~~~
sjmadsen commented 4 years ago

False alarm; this issue is gone today. Gremlins in the DerivedData, I guess.

mattgallagher commented 4 years ago

Thanks for following up.