summaryrefslogtreecommitdiff
path: root/mjit_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit_compile.c')
-rw-r--r--mjit_compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mjit_compile.c b/mjit_compile.c
index 5bf14a1388..6a48d06703 100644
--- a/mjit_compile.c
+++ b/mjit_compile.c
@@ -78,9 +78,13 @@ compile_case_dispatch_each(VALUE key, VALUE value, VALUE arg)
return ST_CONTINUE;
}
+#define MJIT_COMMENT_ID 0
+
+/* Calling rb_id2str in MJIT worker causes random SEGV. So this is disabled by default. */
static void
comment_id(FILE *f, ID id)
{
+#ifdef MJIT_COMMENT_ID
VALUE name = rb_id2str(id);
const char *p, *e;
char c, prev = '\0';
@@ -98,6 +102,7 @@ comment_id(FILE *f, ID id)
prev = c;
}
fputs("\" */", f);
+#endif
}
static void compile_insns(FILE *f, const struct rb_iseq_constant_body *body, unsigned int stack_size,