From dac607756165bca1c5327c5b96e885d91e8f005e Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 15 Mar 2018 14:36:12 -0400 Subject: Increase the buffer size in emit_exception_debug_info (). Fixes https://github.com/mono/mono/issues/7637. --- mono/mini/aot-compiler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 9c31d8d4a09..f9fa1598272 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -6244,6 +6244,10 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg, gboolean stor seq_points_size = (store_seq_points)? mono_seq_point_info_get_write_size (seq_points) : 0; buf_size = header->num_clauses * 256 + debug_info_size + 2048 + seq_points_size + cfg->gc_map_size; + if (jinfo->has_try_block_holes) { + MonoTryBlockHoleTableJitInfo *table = mono_jit_info_get_try_block_hole_table_info (jinfo); + buf_size += table->num_holes * 16; + } p = buf = (guint8 *)g_malloc (buf_size); -- cgit v1.2.3