summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
AgeCommit message (Collapse)Author
2017-04-05Save block argument position in e->cioff; fix #3593Yukihiro "Matz" Matsumoto
2017-04-05Fixed a bug in OP_SUPER block conversion; fix #3590Yukihiro "Matz" Matsumoto
2017-04-05Fixed a bug when method_missing take 126 args; fix #3592Yukihiro "Matz" Matsumoto
2017-04-05Use stderr for debug prints in DEBUG(); fix #3584Yukihiro "Matz" Matsumoto
2017-04-03Fixed out-of-bounds access of `ensure[]`; ref #3491Yukihiro "Matz" Matsumoto
2017-04-03Protect ensure clause lambdas from GC; fix #3491Yukihiro "Matz" Matsumoto
2017-04-03Remove spaces around parensYukihiro "Matz" Matsumoto
2017-04-03Update callinfo->target_class in mrb_exec_irep(); fix #3543Yukihiro "Matz" Matsumoto
2017-04-01Extend VM stack just in case; ref #3551Yukihiro "Matz" Matsumoto
2017-04-01Should not shrink VM stack; fix #3551Yukihiro "Matz" Matsumoto
2017-04-01The stack may be reallocated in the func call; fix #3560Yukihiro "Matz" Matsumoto
2017-04-01Expand stack for method_missing; fix #3528Yukihiro "Matz" Matsumoto
2017-03-19OP_RESCUE refactored; ref #3519Yukihiro "Matz" Matsumoto
2017-03-19Check call depth when mrb_yield_class() is called; ref #3521Yukihiro "Matz" Matsumoto
2017-03-19Update stack only when callinfo is popped; fix #3521Yukihiro "Matz" Matsumoto
2017-03-18Fixed access of uninitialized C local variable; fix #3525Yukihiro "Matz" Matsumoto
2017-03-16Protect stack region before calling mrb_convert_type(); fix #3504Yukihiro "Matz" Matsumoto
2017-03-13OP_BLKPUSH is invalid outside of methods; fix #3501Yukihiro "Matz" Matsumoto
2017-03-12Update VM to support new OP_RESCUE behavior; ref #3487Yukihiro "Matz" Matsumoto
2017-03-12Enhance OP_RESCUE to take B operand fas matching exception; ref #3487Yukihiro "Matz" Matsumoto
2017-03-11Revert 642ab8e; ref #3422Yukihiro "Matz" Matsumoto
Also fix #3499. The issue was solved by #3462.
2017-03-10Update ci->mid according to surrounding scope; fix #3490Yukihiro "Matz" Matsumoto
2017-03-10Simplify expression; ref #3490Yukihiro "Matz" Matsumoto
2017-03-06Avoid trampoline code if mrb_f_send is called from funcall; fix #3383Yukihiro "Matz" Matsumoto
2017-03-04Unshare popped TT_ENV objects.Yukihiro "Matz" Matsumoto
2017-03-04Limit ecall() recursion levels; fix #3466Yukihiro "Matz" Matsumoto
2017-03-02Define jmpbuf_id outside of `extern "C"`; ref #3470Yukihiro "Matz" Matsumoto
2017-03-02Fix possible stack overflow for `method_missing`; fix #3478Yukihiro "Matz" Matsumoto
Instead of shifting mruby VM stack, we always use CALL_MAXARGS.
2017-03-02Reorganize C++ exceptions; ref #3470Yukihiro "Matz" Matsumoto
There are 3 levels of C++ exception handling: * default - no C++ exception (use setjmp/longjmp) * enable_cxx_exception (use C++ exceptions with C ABI) * enable_cxx_abi (use C++ ABI including exceptions)
2017-03-01`ci` may be moved during `mrb_convert_type()`; ref #3474Yukihiro "Matz" Matsumoto
2017-02-27Check if OP_RETURN cross C function boundary; fix #3462Yukihiro "Matz" Matsumoto
2017-02-27Fixed ecall() invoked too early; fix #3464Yukihiro "Matz" Matsumoto
2017-02-27Update local variable only after the value is checked.Yukihiro "Matz" Matsumoto
2017-02-27Clear block arg when method_missing takes *args.Yukihiro "Matz" Matsumoto
2017-02-27Stack may be reallocated in mrb_run(); fix #3465Yukihiro "Matz" Matsumoto
2017-02-27Always keep block argument space in stack; fix #3469Yukihiro "Matz" Matsumoto
2017-02-15Prohibit too deep `mrb_funcall()` recursion; ref #3421Yukihiro "Matz" Matsumoto
`mrb_funcall()` recursion can cause stack overflow easily, so recursion depth is now limited to MRB_FUNCALL_DEPTH_MAX, which default value is 512.
2017-02-15Preallocate SystemStackError; ref #3421Yukihiro "Matz" Matsumoto
2017-02-14Extend mruby stack when keep is bigger than room; fix #3421Yukihiro "Matz" Matsumoto
But #3421 still cause stack overflow error due to infinite recursion. To prevent overflow, we need to add different stack depth check.
2017-02-13Should handle `break` from funcall(); fix #3434Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/d4nny
2017-02-13Fixed too much value_copy() when block is not given; fix #3440Yukihiro "Matz" Matsumoto
The issue was reported by https://hackerone.com/titanous
2017-02-11Avoid direct return from ecall(); fix #3441Yukihiro "Matz" Matsumoto
There's incompatibility left for mruby. When you return from `ensure` clause, mruby simply ignores the return value. CRuby returns from the method squashing the exception raised. ``` def f no_such_method() # NoMethodError ensure return 22 end p f() # CRuby prints `22` ```
2017-02-11`ecall()` should preserve stack address referenced from ci[1].Yukihiro "Matz" Matsumoto
OP_RETURN accesses ci[1]->stackent that might be broken; fix #3442
2017-02-08Add MRB_TT_PROC check to OP_SUPER as well; fix #3432Yukihiro "Matz" Matsumoto
2017-02-08Check if m->env is NULL before dereferencing it; fix #3436Yukihiro "Matz" Matsumoto
2017-02-08Fixed a bug in ci address shifting; fix #3423Yukihiro "Matz" Matsumoto
Dinko Galetic and Denis Kasak reported the issue and the fix. (via https://hackerone.com/dgaletic).
2017-02-04Make `eval` to use trampoline technique; fix #3415Yukihiro "Matz" Matsumoto
Now `eval()` can call Fiber.yield etc.
2017-01-25Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396Yukihiro "Matz" Matsumoto
2017-01-23The ensure clause should keep its ci after its execution; fix #3406Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/ston3
2017-01-21Stack position may be bigger than stack bottom; fix #3401Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/titanous