[runtime] Overwrite stacktrace for exception on re-throw. Fixes #1856.
[mono.git] / mono / mini / exceptions-sparc.c
index 3ebe2e7a29c422b5bc72c2a65e1002cd8a1ad235..52a93ac1f13f925b20c3bb1961fe255c2e8071b3 100644 (file)
@@ -180,8 +180,10 @@ throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
 
        if (mono_object_isinst (exc, mono_defaults.exception_class)) {
                MonoException *mono_ex = (MonoException*)exc;
-               if (!rethrow)
+               if (!rethrow) {
                        mono_ex->stack_trace = NULL;
+                       mono_ex->trace_ips = NULL;
+               }
        }
        mono_handle_exception (&ctx, exc);
        restore_context (&ctx);