From adb4723953764e0afe544322919a4af00f26970b Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Sat, 28 Aug 2021 17:32:32 +0900 Subject: [PATCH] [9.x] Update CwlPreconditionTesting to 2.0.1 --- Cartfile.private | 2 +- Cartfile.resolved | 2 +- .../CwlMachBadInstructionHandler.m | 6 +++++- .../include/CwlMachBadInstructionHandler.h | 2 ++ .../CwlPreconditionTesting/CwlCatchBadInstruction.swift | 4 ++-- Package.resolved | 4 ++-- Package.swift | 2 +- Package@swift-5.2.swift | 2 +- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index a04db39fd..ad8ae5fd4 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,2 +1,2 @@ github "mattgallagher/CwlCatchException" ~> 2.0 -github "mattgallagher/CwlPreconditionTesting" ~> 2.0 +github "mattgallagher/CwlPreconditionTesting" ~> 2.0.1 diff --git a/Cartfile.resolved b/Cartfile.resolved index 2ba0b9ece..7e23d3f9e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ github "mattgallagher/CwlCatchException" "2.0.0" -github "mattgallagher/CwlPreconditionTesting" "2.0.0" +github "mattgallagher/CwlPreconditionTesting" "2.0.1" diff --git a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m index 2ab0ea5e1..d07fc531e 100644 --- a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m +++ b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m @@ -48,6 +48,10 @@ kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_po assert(false); return KERN_FAILURE; } - + +NDR_record_t mach_ndr_record(void) { + return NDR_record; +} + #endif /* TARGET_OS_OSX || TARGET_OS_IOS */ #endif /* __APPLE__ */ diff --git a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h index 3fbd5a409..6feabe5ad 100644 --- a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h +++ b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h @@ -73,6 +73,8 @@ typedef struct mach_msg_type_number_t * _Nullable new_stateCnt; } bad_instruction_exception_reply_t; +NDR_record_t mach_ndr_record(void); + NS_ASSUME_NONNULL_END #endif diff --git a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift index 521b2a110..613a5daa0 100644 --- a/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift +++ b/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift @@ -108,8 +108,8 @@ private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutable reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) reply.Head.msgh_remote_port = request.Head.msgh_remote_port reply.Head.msgh_size = UInt32(MemoryLayout.size) - reply.NDR = NDR_record - + reply.NDR = mach_ndr_record() + if !handledfirstException { // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in diff --git a/Package.resolved b/Package.resolved index e79774ff5..a6bc4f128 100644 --- a/Package.resolved +++ b/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", "state": { "branch": null, - "revision": "02b7a39a99c4da27abe03cab2053a9034379639f", - "version": "2.0.0" + "revision": "0630439888c94657a235ffcd5977d6047ef3c87b", + "version": "2.0.1" } } ] diff --git a/Package.swift b/Package.swift index 8391041ce..9bf230486 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,7 @@ let package = Package( .library(name: "Nimble", targets: ["Nimble"]), ], dependencies: [ - .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.0.0")), + .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.0.1")), ], targets: [ .target( diff --git a/Package@swift-5.2.swift b/Package@swift-5.2.swift index f4d666920..200405413 100644 --- a/Package@swift-5.2.swift +++ b/Package@swift-5.2.swift @@ -10,7 +10,7 @@ let package = Package( .library(name: "Nimble", targets: ["Nimble"]), ], dependencies: [ - .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.0.0")), + .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.0.1")), ], targets: [ .target(