* vm.c (ENV_IN_HEAP_P): fix off-by-one error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2013-02-16 11:58:33 +00:00
parent b38334e2ec
commit 16aedfe0a0
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Sat Feb 16 20:51:17 2013 Kazuki Tsujimoto <kazuki@callcc.net>
* vm.c (ENV_IN_HEAP_P): fix off-by-one error.
Sat Feb 16 20:47:16 2013 Akinori MUSHA <knu@iDaemons.org>
* configure.in (LIBRUBY_DLDFLAGS): Fix a bug where --with-opt-dir

2
vm.c
View File

@ -262,7 +262,7 @@ ruby_vm_run_at_exit_hooks(rb_vm_t *vm)
*/
#define ENV_IN_HEAP_P(th, env) \
(!((th)->stack < (env) && (env) < ((th)->stack + (th)->stack_size)))
(!((th)->stack <= (env) && (env) < ((th)->stack + (th)->stack_size)))
#define ENV_VAL(env) ((env)[1])
static void