[mono/mono] 21d5d266: [runtime] Only do the stack manipulation added by 79e0856ffda4c2566314ba31677fe55f2d7f53f2 on linux, since it seems to crash on osx.

"Zoltan Varga ([email protected])" <[email protected]> Fri, 8 Nov 2013 01:41:13 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000142355ec7f5-076b9099-cc46-4d5d-a815-4a7f0d0c2eb2-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/8cf7650d3d1f...21d5d266e923

   Commit: 21d5d266e9232ddb7432ba437e37efe95cb5d5df
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-08 01:40:06 GMT
      URL: https://github.com/mono/mono/commit/21d5d266e9232ddb7432ba437e37efe95cb5d5df

[runtime] Only do the stack manipulation added by 79e0856ffda4c2566314ba31677fe55f2d7f53f2 on linux, since it seems to crash on osx.

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

Modified: mono/mini/exceptions-amd64.c
===================================================================
@@ -753,6 +753,8 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
 	MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
 	MonoContext ctx;
 
+	while (TRUE)
+		;
 	memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
 
 	if (mono_debugger_handle_exception (&ctx, (MonoObject *)obj))
@@ -775,8 +777,10 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
 	/* The stack should be unaligned */
 	if ((sp % 16) == 0)
 		sp -= 8;
+#ifdef __linux__
 	/* Preserve the call chain to prevent crashes in the libgcc unwinder (#15969) */
 	*(guint64*)sp = ctx->rip;
+#endif
 	ctx->rsp = sp;
 	ctx->rip = (guint64)async_cb;
 }


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