diff --git source/thirdparty/breakpad/src/client/windows/handler/exception_handler.cc source/thirdparty/breakpad/src/client/windows/handler/exception_handler.cc
index 1f7b19f..b163054 100644
--- source/thirdparty/breakpad/src/client/windows/handler/exception_handler.cc
+++ source/thirdparty/breakpad/src/client/windows/handler/exception_handler.cc
@@ -272,8 +272,12 @@ void ExceptionHandler::Initialize(
     }
     handler_stack_->push_back(this);
 
-    if (handler_types & HANDLER_EXCEPTION)
+    if (handler_types & HANDLER_EXCEPTION) {
+#if defined(_WIN64)
+      AddVectoredExceptionHandler(/*first=*/0, PreExceptionVectoredHandler);
+#endif // WIN64
       previous_filter_ = SetUnhandledExceptionFilter(HandleException);
+    }
 
 #if _MSC_VER >= 1400  // MSVC 2005/8
     if (handler_types & HANDLER_INVALID_PARAMETER)
@@ -299,8 +303,10 @@ ExceptionHandler::~ExceptionHandler() {
   if (handler_types_ != HANDLER_NONE) {
     EnterCriticalSection(&handler_stack_critical_section_);
 
-    if (handler_types_ & HANDLER_EXCEPTION)
+    if (handler_types_ & HANDLER_EXCEPTION) {
+      RemoveVectoredExceptionHandler(PreExceptionVectoredHandler);
       SetUnhandledExceptionFilter(previous_filter_);
+    }
 
 #if _MSC_VER >= 1400  // MSVC 2005/8
     if (handler_types_ & HANDLER_INVALID_PARAMETER)
@@ -463,46 +469,52 @@ class AutoExceptionHandler {
   ExceptionHandler* handler_;
 };
 
-// static
-LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) {
-  AutoExceptionHandler auto_exception_handler;
-  ExceptionHandler* current_handler = auto_exception_handler.get_handler();
-
+bool ExceptionHandler::AttemptToWriteCrashReport(EXCEPTION_POINTERS* exinfo) {
   // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions.  This
   // logic will short-circuit before calling WriteMinidumpOnHandlerThread,
   // allowing something else to handle the breakpoint without incurring the
   // overhead transitioning to and from the handler thread.  This behavior
   // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions.
   DWORD code = exinfo->ExceptionRecord->ExceptionCode;
-  LONG action;
   bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) ||
                             (code == EXCEPTION_SINGLE_STEP);
 
   if (code == EXCEPTION_INVALID_HANDLE &&
-      current_handler->consume_invalid_handle_exceptions_) {
+      consume_invalid_handle_exceptions_) {
     return EXCEPTION_CONTINUE_EXECUTION;
   }
 
   bool success = false;
 
   if (!is_debug_exception ||
-      current_handler->get_handle_debug_exceptions()) {
+      get_handle_debug_exceptions()) {
     // If out-of-proc crash handler client is available, we have to use that
     // to generate dump and we cannot fall back on in-proc dump generation
     // because we never prepared for an in-proc dump generation
 
     // In case of out-of-process dump generation, directly call
     // WriteMinidumpWithException since there is no separate thread running.
-    if (current_handler->IsOutOfProcess()) {
-      success = current_handler->WriteMinidumpWithException(
+    if (IsOutOfProcess()) {
+      success = WriteMinidumpWithException(
           GetCurrentThreadId(),
           exinfo,
           NULL);
     } else {
-      success = current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL);
+      success = WriteMinidumpOnHandlerThread(exinfo, NULL);
     }
   }
 
+  return success;
+}
+
+// static
+LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) {
+  AutoExceptionHandler auto_exception_handler;
+  ExceptionHandler* current_handler = auto_exception_handler.get_handler();
+
+  LONG action;
+  bool success = current_handler->AttemptToWriteCrashReport(exinfo);
+
   // The handler fully handled the exception.  Returning
   // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually
   // results in the application being terminated.
@@ -531,6 +543,109 @@ LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) {
   return action;
 }
 
+#if defined(_WIN64)
+// static
+LONG ExceptionHandler::PreExceptionVectoredHandler(EXCEPTION_POINTERS* exinfo) {
+  // This function is called when an exception has occurred, but
+  // before the SEH unwinding mechanism takes over.
+  //
+  // We have a problem with the JIT on Win64; it doesn't follow the
+  // platform's conventions for exposing unwind information.
+  // Dynamically-generated code should record unwind tables for all
+  // such code by means of RtlInstallFunctionTableCallback or
+  // RtlAddFunctionTable.  Since the JIT doesn't do this, the
+  // unwinding mechanism can't find unwind information for any PC
+  // which lies within JIT'd code.  Therefore, it assumes--per
+  // platform conventions--that such a PC represents a leaf function,
+  // which can be walked via a simple scheme of finding the return
+  // address at [rsp] and continuing.  Doing this for JIT'd code
+  // results in random walks through the address space, eventually
+  // leading to errors while unwinding, which causes crashes that
+  // completely bypass the crash reporter.
+  //
+  // This situation is undesirable.
+  //
+  // As a stopgap, we employ a heuristic here.  We manually unwind the
+  // stack outrselves, simulating what RtlUnwindEx and friends would
+  // do.  But if we encounter a leaf function in the middle of the
+  // call stack, then we know that actual stack unwinding is going to
+  // cause nested errors.  Therefore, we go ahead and dump a crash
+  // report in that case.
+  //
+  // If we don't walk through too many leaf functions, and thereby
+  // unwind all the way back to the beginning of the program, then we
+  // do not dump a crash report.
+  //
+  // In either scenario, we will return EXCEPTION_CONTINUE_SEARCH from
+  // this handler; there's no way we could possibly resume execution.
+  // This handler, then, simply acts as a heuristic filter to continue
+  // to get crash reports in the presence of JIT code that doesn't
+  // follow platform conventions.
+  //
+  // Credit is due to http://www.nynaeve.net/?p=113 and associated
+  // links for describing everything we need for this routine.
+  CONTEXT context = *exinfo->ContextRecord;
+  UNWIND_HISTORY_TABLE unwind_history_table;
+  RtlZeroMemory(&unwind_history_table, sizeof(unwind_history_table));
+
+  bool first_time = true;
+
+  while (true) {
+    KNONVOLATILE_CONTEXT_POINTERS nv_context;
+    RtlZeroMemory(&nv_context, sizeof(nv_context));
+    ULONG64 image_base, establisher_frame;
+    PVOID handler_data;
+
+    PRUNTIME_FUNCTION rtfunc = RtlLookupFunctionEntry(context.Rip,
+						      &image_base,
+						      &unwind_history_table);
+
+    if (!rtfunc) {
+      // context.Rip was a "leaf function" without any unwind data.
+
+      // Check to see whether we are encountering a leaf function in
+      // the middle of our unwind.  Such a function violates the
+      // platform convenctions, and we will assume that such a
+      // function is generated by the JIT.
+      if (!first_time) {
+	// Attempt to write out a crash report.  This writing might
+	// fail, because we have a debug exception or because we
+	// cannot write a crash report, for instance.  Whatever the
+	// case, we cannot usefully recover from that failure here, so
+	// ignore the return value.
+	AutoExceptionHandler auto_exception_handler;
+	ExceptionHandler* current_handler =
+	  auto_exception_handler.get_handler();
+	(void) current_handler->AttemptToWriteCrashReport(exinfo);
+	break;
+      }
+      // Leaf functions are unwound by following return addresses at the
+      // current stack pointer.
+      context.Rip = *reinterpret_cast<ULONG64*>(context.Rsp);
+      context.Rsp += sizeof(ULONG64);
+    } else {
+      // Let the system do the hard work of unwinding for us.
+      RtlVirtualUnwind(UNW_FLAG_NHANDLER,
+		       image_base,
+		       context.Rip,
+		       rtfunc,
+		       &context,
+		       &handler_data,
+		       &establisher_frame,
+		       &nv_context);
+    }
+
+    // A RIP of zero means that we have finished walking the call stack.
+    if (!context.Rip) {
+      break;
+    }
+    first_time = false;
+  }
+
+  return EXCEPTION_CONTINUE_SEARCH;
+}
+#endif // _WIN64
+
 #if _MSC_VER >= 1400  // MSVC 2005/8
 // static
 void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression,
diff --git source/thirdparty/breakpad/src/client/windows/handler/exception_handler.h source/thirdparty/breakpad/src/client/windows/handler/exception_handler.h
index 11babe5..e45d5b8 100644
--- source/thirdparty/breakpad/src/client/windows/handler/exception_handler.h
+++ source/thirdparty/breakpad/src/client/windows/handler/exception_handler.h
@@ -318,6 +318,13 @@ class ExceptionHandler {
   // Signals the exception handler thread to handle the exception.
   static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo);
 
+  bool AttemptToWriteCrashReport(EXCEPTION_POINTERS* exinfo);
+
+#if defined(_WIN64)
+  // Called on the exception thread when an exception occurs.
+  static LONG WINAPI PreExceptionVectoredHandler(EXCEPTION_POINTERS* exinfo);
+#endif // _WIN64
+
 #if _MSC_VER >= 1400  // MSVC 2005/8
   // This function will be called by some CRT functions when they detect
   // that they were passed an invalid parameter.  Note that in _DEBUG builds,
