2010-07-01 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 30 Jun 2010 23:46:51 +0000 (23:46 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 30 Jun 2010 23:46:51 +0000 (23:46 -0000)
* unwind.c (mono_unwind_decode_fde): Fix the decoding of the lsda offset.

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

mono/mini/ChangeLog
mono/mini/unwind.c

index 52fdca63b3a67545139618cd207b07b6b959fd73..9bcee4c103a37a6d6295b706a6f1c636c762c1e9 100755 (executable)
@@ -1,3 +1,7 @@
+2010-07-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * unwind.c (mono_unwind_decode_fde): Fix the decoding of the lsda offset.
+
 2010-06-30  Zoltan Varga  <vargaz@gmail.com>
 
        * mini.c (mini_cleanup): Avoid calling mono_runtime_shutdown () if cross
index 486db45d6c41607dd8cfb4ca907237ee3e81fb82..291b6ae8872c9d7d0d7dfe1ec9e7ae5fa41a63e1 100644 (file)
@@ -906,13 +906,13 @@ mono_unwind_decode_fde (guint8 *fde, guint32 *out_len, guint32 *code_len, MonoJi
 
                /* sdata|pcrel encoding */
                if (aug_len == 4)
-                       lsda_offset = *(gint64*)fde_aug;
+                       lsda_offset = read32 (fde_aug);
                else if (aug_len == 8)
-                       lsda_offset = *(gint32*)fde_aug;
+                       lsda_offset = *(gint64*)fde_aug;
                else
                        g_assert_not_reached ();
                if (lsda_offset != 0) {
-                       lsda = fde_aug + *(gint32*)fde_aug;
+                       lsda = fde_aug + lsda_offset;
 
                        decode_lsda (lsda, code, ex_info, ex_info_len, type_info, this_reg, this_offset);
                }