From: Zoltan Varga Date: Wed, 18 Feb 2015 23:24:44 +0000 (-0500) Subject: [aot] Fix the computation of LLVM code ranges. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=98316e0be1e96ce158d2da28a971421899eaa673;p=mono.git [aot] Fix the computation of LLVM code ranges. --- diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c index 01deb31d4bc..87e0c532d55 100644 --- a/mono/mini/aot-runtime.c +++ b/mono/mini/aot-runtime.c @@ -2374,8 +2374,10 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c table = (gint32*)p; if (fde_count) { - *code_start = amodule->code + amodule->code_offsets [table [0]]; - *code_end = *code_start + amodule->code_offsets [table [(fde_count - 1) * 2]] + table [fde_count * 2]; + g_assert (fde_count != 1); + g_assert (table [0] == -1); + *code_start = amodule->code + amodule->code_offsets [table [2]]; + *code_end = amodule->code + amodule->code_offsets [table [(fde_count - 1) * 2]] + table [fde_count * 2]; } }