From ddcb40f5952965561ca19d97495ebeb977590060 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sat, 11 Aug 2018 07:57:58 +0000 Subject: mjit_worker.c: carve out worker-related code The motivation of this change is to make sure rb_funcall or GC-related functions are not called on worker-related code. Currently such functions are used in some places and I believe it's partly because it's hard to identify which part is called on MJIT worker thread. Now, mjit.c is safe to use them but we know we need to safely deal with mjit_compile.c, mjit_worker.c and mjit_internal.h. mjit_compile.c: update the comment about it git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- mjit_compile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mjit_compile.c') diff --git a/mjit_compile.c b/mjit_compile.c index 63a24837fe..63d0757877 100644 --- a/mjit_compile.c +++ b/mjit_compile.c @@ -6,6 +6,10 @@ **********************************************************************/ +/* NOTE: All functions in this file are executed on MJIT worker. So don't + call Ruby methods (C functions that may call rb_funcall) or trigger + GC (using xmalloc, ZALLOC, etc.) in this file. */ + #include "internal.h" #include "vm_core.h" #include "vm_exec.h" -- cgit v1.2.3