[mono/mono] 79e0856f: [runtime] Preserve the call chain in mono_arch_setup_async_callback () on amd64 to prevent crashes in the libgcc unwinder (#15969).

"Zoltan Varga ([email protected])" <[email protected]> Thu, 7 Nov 2013 03:58:05 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <0000014230b5bafc-7014b900-bd66-4e4d-99eb-0b8a4c5b9ff2-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/613906e04b7d...79e0856ffda4

   Commit: 79e0856ffda4c2566314ba31677fe55f2d7f53f2
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-07 03:56:57 GMT
      URL: https://github.com/mono/mono/commit/79e0856ffda4c2566314ba31677fe55f2d7f53f2

[runtime] Preserve the call chain in mono_arch_setup_async_callback () on amd64 to prevent crashes in the libgcc unwinder (#15969).

Changed paths:
  M mono/mini/exceptions-amd64.c

Modified: mono/mini/exceptions-amd64.c
===================================================================
@@ -775,6 +775,8 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
 	/* The stack should be unaligned */
 	if ((sp % 16) == 0)
 		sp -= 8;
+	/* Preserve the call chain to prevent crashes in the libgcc unwinder (#15969) */
+	*(guint64*)sp = ctx->rip;
 	ctx->rsp = sp;
 	ctx->rip = (guint64)async_cb;
 }


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches