summaryrefslogtreecommitdiff
path: root/random.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
commitc2bfb4e93c674347b7eb09a30856e3d75f74cf4d (patch)
treeb898add4e9f9ab117aebcad189d47e79984c2f16 /random.c
parentecda2d23d593eea81a4daf97ec0d74945fa96baf (diff)
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 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index 14588c75d7..d8cfd38016 100644
--- a/random.c
+++ b/random.c
@@ -573,7 +573,7 @@ fill_random_bytes_syscall(void *seed, size_t size, int need_secure)
# define fill_random_bytes_syscall(seed, size, need_secure) -1
#endif
-static int
+int
fill_random_bytes(void *seed, size_t size, int need_secure)
{
int ret = fill_random_bytes_syscall(seed, size, need_secure);