mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
This commit is contained in:
parent
ecda2d23d5
commit
c2bfb4e93c
10 changed files with 279 additions and 1 deletions
2
random.c
2
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue