2010-06-17 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Thu, 17 Jun 2010 20:17:19 +0000 (20:17 -0000)
committerZoltan Varga <vargaz@gmail.com>
Thu, 17 Jun 2010 20:17:19 +0000 (20:17 -0000)
* exceptions-x86.c (mono_x86_throw_corlib_exception): Negate the decrement of
the ip done by throw_exception (), it is not needed for corlib exceptions.

svn path=/trunk/mono/; revision=159101

mono/mini/ChangeLog
mono/mini/exceptions-x86.c

index 94d9ec1c4594b865f2b821a54ca6141c1e8726fb..2a06e27037f6f6fd9e6f29d74eca7969edbb9828 100755 (executable)
@@ -1,3 +1,8 @@
+2010-06-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-x86.c (mono_x86_throw_corlib_exception): Negate the decrement of
+       the ip done by throw_exception (), it is not needed for corlib exceptions.
+
 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * method-to-ir.c (mono_emit_wb_aware_memcpy): Simplify this function.
index e024dc1551989f1bca9befee336603c44b6a88be..895318b969f621ba84ab6f5752bca53aaaad53a8 100644 (file)
@@ -452,6 +452,9 @@ mono_x86_throw_corlib_exception (mgreg_t *regs, guint32 ex_token_index,
 
        eip -= pc_offset;
 
+       /* Negate the ip adjustment done in mono_x86_throw_exception () */
+       eip += 1;
+
        mono_x86_throw_exception (regs, (MonoObject*)ex, eip, FALSE);
 }