Files
mruby-mruby/src
Kouhei Sutou c77123d20a Fix SEGV by stack extension in mrb_get_args()
mrb_get_args() keeps pointer of the current stack. But address of the
current stack maybe changed by method call.

'i' format character calls #to_i when the argument isn't integer but
has #to_i.

Here is a code that may call #to_i in mrb_get_args():

    case 'i':
      // ...
            default:
              *p = mrb_fixnum(mrb_Integer(mrb, ARGV[arg_i]));
              break;
     // ...

Here is a code #to_i is called:

    class X
      def initialize(i)
        @i = i
      end

      def to_i
        @i
      end
    end

    [][X.new(0), 0] # X#to_i is called

So, mrb_get_args() shouldn't keep pointer and use it. mrb_get_args()
should always refer mrb->ci->stack to use valid address of the current
stack.
2016-01-22 00:20:00 +09:00
..
2012-04-20 09:39:03 +09:00
2016-01-07 11:24:16 -05:00
2015-12-22 17:46:20 +09:00
2015-12-29 20:36:12 +09:00
2015-12-22 17:46:20 +09:00
2016-01-19 16:37:42 +09:00
2015-12-29 20:36:12 +09:00
2016-01-14 11:07:07 +09:00
2016-01-06 11:59:09 +09:00
2016-01-19 16:37:42 +09:00