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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
2 index b0ee5b2..fe40899 100644
3 --- a/libusb/os/darwin_usb.c
4 +++ b/libusb/os/darwin_usb.c
5 @@ -1449,8 +1449,14 @@ static int submit_bulk_transfer(struct usbi_transfer *itr ansfer) {
6
7 cInterface = &priv->interfaces[iface];
8
9 - (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef , &direction, &number,
10 - &transferType, &maxPacketSize, &interval);
11 + ret = (*(cInterface->interface))->GetPipeProperties (cInterface->interface, p ipeRef, &direction, &number,
12 + &transferType, &maxPacke tSize, &interval);
13 +
14 + if (ret) {
15 + usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (co de = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
16 + darwin_error_str(ret), ret);
17 + return darwin_to_libusb (ret);
18 + }
19
20 if (0 != (transfer->length % maxPacketSize)) {
21 /* do not need a zero packet */
22
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698