Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2408)

Unified Diff: third_party/libusb/darwin-sigfpe.patch

Issue 23137025: Emergency fix for Mac: crash with EXC_ARITHMETIC in submit_bulk_transfer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libusb/darwin-sigfpe.patch
diff --git a/third_party/libusb/darwin-sigfpe.patch b/third_party/libusb/darwin-sigfpe.patch
new file mode 100644
index 0000000000000000000000000000000000000000..3c74db1857015c18dd7854871b41f2d5dd728a2c
--- /dev/null
+++ b/third_party/libusb/darwin-sigfpe.patch
@@ -0,0 +1,22 @@
+diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
+index b0ee5b2..fe40899 100644
+--- a/libusb/os/darwin_usb.c
++++ b/libusb/os/darwin_usb.c
+@@ -1449,8 +1449,14 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
+
+ cInterface = &priv->interfaces[iface];
+
+- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
+- &transferType, &maxPacketSize, &interval);
++ ret = (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
++ &transferType, &maxPacketSize, &interval);
++
++ if (ret) {
++ usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (code = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
++ darwin_error_str(ret), ret);
++ return darwin_to_libusb (ret);
++ }
+
+ if (0 != (transfer->length % maxPacketSize)) {
+ /* do not need a zero packet */
+

Powered by Google App Engine
This is Rietveld 408576698