summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2017-02-15Move BasicObject#method_missing to Kernel#method_missing; ref #3417Yukihiro "Matz" Matsumoto
More compatibility to CRuby. Updated tests that assume old mruby behavior.
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-15Do not funcall() Exception#set_backtrace from runtime.Yukihiro "Matz" Matsumoto
This change reduce flexibility but makes mruby simpler and faster.
2017-02-15Preallocate SystemStackError; ref #3421Yukihiro "Matz" Matsumoto
2017-02-15Avoid calling hook methods if they are not overridden.Yukihiro "Matz" Matsumoto
2017-02-15Use mrb_funcall_argv() instead of mrb_funcall()Yukihiro "Matz" Matsumoto
2017-02-14Do not use mrb_funcall() if Hash#default is not overridden; ref #3421Yukihiro "Matz" Matsumoto
This change reduces the recursion level, but does not solve the stack overflow issue entirely.
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-11Merge pull request #3451 from dabroz/revert-string-mulYukihiro "Matz" Matsumoto
Revert "Optimization for String#* for 1-byte strings"
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-11Revert "Optimization for String#* for 1-byte strings"Tomasz Dabrowski
This reverts commit d1bc7caecaf337976351934d5910726106601bd9.
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-11String#replace should update s->flags for MRB_STR_NO_UTF.Yukihiro "Matz" Matsumoto
Otherwise String#size may return wrong length; fix #3448
2017-02-11Add type cast to pacify warningYukihiro "Matz" Matsumoto
2017-02-10Optimization for String#* for 1-byte stringsTomasz Dabrowski
2017-02-08Check if irep is NULL before print_backtrace()Yukihiro "Matz" Matsumoto
According to the valgrind log attached to #3438, proc->body.irep may be NULL in some cases.
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-08Mark classes referenced from saved backtrace.Yukihiro "Matz" Matsumoto
Maybe related to #3438
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-08codedump.c: OP_POPERR does not have register access.Yukihiro "Matz" Matsumoto
2017-02-07Fix interpolation escaping in String.inspectEdgar Boda-Majer
2017-02-06Kernel#local_variables: Make result array uniqueksss
2017-02-04Make `eval` to use trampoline technique; fix #3415Yukihiro "Matz" Matsumoto
Now `eval()` can call Fiber.yield etc.
2017-02-04`argv` may be modified when `mrb_funcall()` is called; fix #3419Yukihiro "Matz" Matsumoto
Calling `mrb_funcall()` and `mrb_yield()` (and their related functions) are discouraged unless absolutely necessary, because it can cause this kind of issues very easily.
2017-02-04No need to make env unshared in the finalization; fix #3425Yukihiro "Matz" Matsumoto
2017-02-04Mark `mrb->backtrace.exc` as GC root; fix #3388Yukihiro "Matz" Matsumoto
2017-01-25Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396Yukihiro "Matz" Matsumoto
2017-01-24Outer class may be same as the class; fix #3382Yukihiro "Matz" Matsumoto
2017-01-24Use size_t to avoid integer overflow in mrb_ary_splice(); fix #3413Yukihiro "Matz" Matsumoto
2017-01-23Change return type of mrb_range_beg_len() from `int` to `mrb_int`.Yukihiro "Matz" Matsumoto
ref #3411
2017-01-23Fix a double free problem in codegen.c; fix #3378Yukihiro "Matz" Matsumoto
This issue was first reported by https://hackerone.com/geeknik The fix was proposed by @titanous
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-23Backtrace list must be an array of strings; fix #3408Yukihiro "Matz" Matsumoto
2017-01-23Skip non string values in backtraces; ref #3408Yukihiro "Matz" Matsumoto
2017-01-23Refactoring: Use array_copy instead of for loopksss
2017-01-23Add MRB_API to mrb_range_beg_len(); ref #3411Yukihiro "Matz" Matsumoto
2017-01-23Changed the behavior of mrb_range_beg_len(); close #3411Yukihiro "Matz" Matsumoto
The new API is: int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc) The new argument `trunc` is a boolean value that specifies whether the function truncates the range. The new return value is an integer instead of a boolean, that is: 0: not a range 1: range with proper edges 2: out of range To get the old behavior, you have to rewrite: mrb_range_beg_len(mrb, range, &beg, &len, len) to: mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1 [Breaking Change]
2017-01-23Should not make empty strings shared; fix #3407Yukihiro "Matz" Matsumoto
2017-01-23Use mrb_write_barrier() instead of mrb_field_write_barrier_value()Yukihiro "Matz" Matsumoto
ref #3409
2017-01-23Remove unnecessary inline declaration; ref #3409Yukihiro "Matz" Matsumoto
2017-01-23Merge pull request #3409 from ksss/mrb_ary_spliceYukihiro "Matz" Matsumoto
Rewrite mrb_ary_splice
2017-01-22Should raise RuntimeError when object frozenksss
2017-01-22Rewrite mrb_ary_spliceksss
Referenced to CRuby's array.c(rb_ary_splice) fix #3405
2017-01-21Stack position may be bigger than stack bottom; fix #3401Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/titanous
2017-01-18Initialize callinfo->acc; ref #3243Yukihiro "Matz" Matsumoto
2017-01-18Merge pull request #3362 from ksss/procYukihiro "Matz" Matsumoto
Proc shouldn't have `initialize` method
2017-01-12Add proper given argument number in the wrong-number-argument error.Yukihiro "Matz" Matsumoto