aboutsummaryrefslogtreecommitdiffstats
path: root/inits.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-11 09:48:58 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-11 09:48:58 +0000
commit91e2e55d98a2ffd8eed748db343d976ab6812207 (patch)
treeb898add4e9f9ab117aebcad189d47e79984c2f16 /inits.c
parent95d7041a627a6f1b13a452baed267a2dce7c2f21 (diff)
downloadruby-91e2e55d98a2ffd8eed748db343d976ab6812207.tar.gz
add new instruction attribute called leaf
An instruction is leaf if it has no rb_funcall inside. In order to check this property, we introduce stack canary which is a random number collected at runtime. Stack top is always filled with this number and checked for stack smashing operations, when VM_CHECK_MODE. [GH-1947] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'inits.c')
-rw-r--r--inits.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/inits.c b/inits.c
index 13fa069236..c9687de516 100644
--- a/inits.c
+++ b/inits.c
@@ -61,6 +61,7 @@ rb_call_inits(void)
CALL(Complex);
CALL(version);
CALL(vm_trace);
+ CALL(vm_stack_canary);
CALL(ast);
}
#undef CALL