[jit] Compile unwinder_unwind_frame without optimization on arm64 as old gcc versions...
authorZoltan Varga <vargaz@gmail.com>
Thu, 4 May 2017 15:58:59 +0000 (11:58 -0400)
committerZoltan Varga <vargaz@gmail.com>
Thu, 4 May 2017 15:59:09 +0000 (11:59 -0400)
mono/mini/mini-exceptions.c

index 90d85b88ab41d1127f82f118f2e1b0995858bb3e..57b669fb9e12c050c044e67d9ec183f17f8aaeaa 100644 (file)
@@ -642,7 +642,12 @@ unwinder_init (Unwinder *unwinder)
        memset (unwinder, 0, sizeof (Unwinder));
 }
 
+#if defined(GNUC) && defined(TARGET_ARM64)
+/* gcc 4.9.2 seems to miscompile this on arm64 */
+static __attribute__((optimize("O0"))) gboolean
+#else
 static gboolean
+#endif
 unwinder_unwind_frame (Unwinder *unwinder,
                                           MonoDomain *domain, MonoJitTlsData *jit_tls,
                                           MonoJitInfo *prev_ji, MonoContext *ctx,
@@ -1946,6 +1951,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                        lmf = jit_tls->resume_state.lmf;
                        first_filter_idx = jit_tls->resume_state.first_filter_idx;
                        filter_idx = jit_tls->resume_state.filter_idx;
+                       in_interp = FALSE;
                } else {
                        unwind_res = unwinder_unwind_frame (&unwinder, domain, jit_tls, NULL, ctx, &new_ctx, NULL, &lmf, NULL, &frame);
                        if (!unwind_res) {