do {
MonoContext new_ctx;
- mono_arch_find_jit_info (domain, jit_tls, &rji, &ctx, &new_ctx, &lmf, &frame);
+ mono_arch_find_jit_info (domain, jit_tls, &rji, &ctx, &new_ctx, &lmf, NULL, &frame);
if (!frame.ji) {
g_warning ("Exception inside function without unwind info");
g_assert_not_reached ();
/* jump to the saved IP */
x86_ret (code);
+ nacl_global_codeman_validate(&start, 128, &code);
+
if (info)
*info = mono_tramp_info_create (g_strdup_printf ("restore_context"), start, code - start, ji, unwind_ops);
else {
guint8 *code;
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
-#ifdef __native_client_codegen__
- guint kMaxCodeSize = 128;
-#else
- guint kMaxCodeSize = 64;
-#endif /* __native_client_codegen__ */
+ guint kMaxCodeSize = NACL_SIZE (64, 128);
/* call_filter (MonoContext *ctx, unsigned long eip) */
start = code = mono_global_codeman_reserve (kMaxCodeSize);
x86_leave (code);
x86_ret (code);
+ nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
+
if (info)
*info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
else {
int i, stack_size, stack_offset, arg_offsets [5], regs_offset;
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
-#ifdef __native_client_codegen__
- guint kMaxCodeSize = 256;
-#else
- guint kMaxCodeSize = 128;
-#endif
+ guint kMaxCodeSize = NACL_SIZE (128, 256);
+
start = code = mono_global_codeman_reserve (kMaxCodeSize);
stack_size = 128;
}
x86_breakpoint (code);
+ nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
+
g_assert ((code - start) < kMaxCodeSize);
if (info)