1. 17 Feb, 2016 2 commits
  2. 16 Feb, 2016 3 commits
  3. 15 Feb, 2016 2 commits
  4. 11 Feb, 2016 13 commits
  5. 10 Feb, 2016 2 commits
  6. 05 Feb, 2016 3 commits
  7. 04 Feb, 2016 3 commits
  8. 03 Feb, 2016 1 commit
  9. 31 Jan, 2016 2 commits
  10. 30 Jan, 2016 3 commits
  11. 28 Jan, 2016 1 commit
  12. 27 Jan, 2016 1 commit
  13. 21 Jan, 2016 2 commits
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #3090 from kou/fix-segv-by-stack-extension-in-mrb-get-args · 2723b10a
      Yukihiro "Matz" Matsumoto authored
      Fix SEGV by stack extension in mrb_get_args()
      2723b10a
    • Kouhei Sutou's avatar
      Fix SEGV by stack extension in mrb_get_args() · c77123d2
      Kouhei Sutou authored
      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.
      c77123d2
  14. 20 Jan, 2016 2 commits