summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-16 11:46:06 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-16 11:46:06 +0000
commite54e53f355038fa63091fe441c57a735e187eae7 (patch)
tree5b753aa0459622e28055e309d230690982ec0362
parente49a7bed21e764110ba28fa0d54717d8a5213584 (diff)
* vm_core.h (struct rb_iseq_struct): stack_max is changed to int
because all calculations related to stack_max in compile.c (iseq_set_sequence) and vm_insnhelper.c (vm_push_frame) are conducted by using int. This partly reverts r23945. * vm_insnhelper.c (vm_push_frame): ditto. This reverts r42401. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--vm_core.h2
-rw-r--r--vm_insnhelper.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c3733f528..975d2e4895 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jul 16 20:21:49 2014 Naohisa Goto <ngotogenome@gmail.com>
+
+ * vm_core.h (struct rb_iseq_struct): stack_max is changed to int
+ because all calculations related to stack_max in compile.c
+ (iseq_set_sequence) and vm_insnhelper.c (vm_push_frame) are
+ conducted by using int. This partly reverts r23945.
+ * vm_insnhelper.c (vm_push_frame): ditto. This reverts r42401.
+
Wed Jul 16 19:55:32 2014 Naohisa Goto <ngotogenome@gmail.com>
* vm_core.h (struct rb_iseq_struct): temporal workaround of [Bug 10037].
diff --git a/vm_core.h b/vm_core.h
index b284351b52..9e849da252 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -208,7 +208,7 @@ struct rb_iseq_struct {
#if defined(WORDS_BIGENDIAN) && (SIZEOF_VALUE > SIZEOF_INT)
char dummy[SIZEOF_VALUE - SIZEOF_INT]; /* [Bug #10037][ruby-core:63721] */
#endif
- uint32_t stack_max; /* for stack overflow check */
+ int stack_max; /* for stack overflow check */
rb_iseq_location_t location;
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0f9eab1610..d6dd01f1bb 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -49,13 +49,13 @@ vm_push_frame(rb_thread_t *th,
VALUE *sp,
int local_size,
const rb_method_entry_t *me,
- size_t stack_max)
+ int stack_max)
{
rb_control_frame_t *const cfp = th->cfp - 1;
int i;
/* check stack overflow */
- CHECK_VM_STACK_OVERFLOW0(cfp, sp, local_size + (int)stack_max);
+ CHECK_VM_STACK_OVERFLOW0(cfp, sp, local_size + stack_max);
th->cfp = cfp;