- jinfo = decode_llvm_mono_eh_frame (amodule, domain, method, code, code_len, clauses, num_clauses, flags, nesting, &this_reg, &this_offset);
+ flags |= JIT_INFO_HAS_UNWIND_INFO;
+
+ int num_llvm_clauses;
+ /* Get the length first */
+ decode_llvm_mono_eh_frame (amodule, domain, NULL, code, code_len, clauses, num_clauses, nesting, &this_reg, &this_offset, &num_llvm_clauses);
+ len = mono_jit_info_size (flags, num_llvm_clauses, num_holes);
+ jinfo = (MonoJitInfo *)alloc0_jit_info_data (domain, len, async);
+ mono_jit_info_init (jinfo, method, code, code_len, flags, num_llvm_clauses, num_holes);
+
+ decode_llvm_mono_eh_frame (amodule, domain, jinfo, code, code_len, clauses, num_clauses, nesting, &this_reg, &this_offset, NULL);