- 24 Apr, 2021 1 commit
-
-
dearblue authored
Replaces the magic number `7` except in `src/gc.c`.
-
- 23 Apr, 2021 1 commit
-
-
Yukihiro "Matz" Matsumoto authored
-
- 22 Apr, 2021 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
- `_raw` does not describe the nature of the function - the function protect errors during C function execution
-
- 21 Apr, 2021 3 commits
-
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
- 20 Apr, 2021 6 commits
-
-
Yukihiro "Matz" Matsumoto authored
Remove unused struct in `include/mruby/variable.h`
-
Yukihiro "Matz" Matsumoto authored
Remove unused `#include` in `complex.c` and `rational.c`
-
Yukihiro "Matz" Matsumoto authored
Remove `MRB_API` from `mrb_get_backtrace` definition
-
KOBAYASHI Shuji authored
-
KOBAYASHI Shuji authored
-
KOBAYASHI Shuji authored
-
- 19 Apr, 2021 7 commits
-
-
Yukihiro "Matz" Matsumoto authored
Introducing the `mrb_protect_raw()` API function
-
dearblue authored
The purpose is two-fold: 1. to be able to specify a pointer directly when user data is used When using `mrb_protect()`, it is necessary to allocate objects by `mrb_obj_cptr()` function when using user data. Adding `mrb_protect_raw()` will make it simpler to reimplement `mrbgems/mruby-error`. 2. to correctly unwind callinfo when an exception is raised from a C function defined as a method (the main topic) If a method call is made directly under `mrb_protect()` and a C function is called, control is returned from `mrb_protect()` if an exception occurs there. In this case, callinfo is not restored, so it is out of sync. Moreover, returning to mruby VM (`mrb_vm_exec()` function) in this state will indicate `ci->pc` of C function which is equal to `NULL`, and subsequent `JUMP` will cause `SIGSEGV`. Following is an example that actually causes `SIGSEGV`: - `crash.c` ```c #include <mruby.h> #include <mruby/compile.h> #include <mruby/error.h> static mrb_value level1_body(mrb_state *mrb, mrb_value self) { return mrb_funcall(mrb, self, "level2", 0); } static mrb_value level1(mrb_state *mrb, mrb_value self) { return mrb_protect(mrb, level1_body, self, NULL); } static mrb_value level2(mrb_state *mrb, mrb_value self) { mrb_raise(mrb, E_RUNTIME_ERROR, "error!"); return mrb_nil_value(); } int main(int argc, char *argv[]) { mrb_state *mrb = mrb_open(); mrb_define_method(mrb, mrb->object_class, "level1", level1, MRB_ARGS_NONE()); mrb_define_method(mrb, mrb->object_class, "level2", level2, MRB_ARGS_NONE()); mrb_p(mrb, mrb_load_string(mrb, "p level1")); mrb_close(mrb); return 0; } ``` - compile & run ```console % `bin/mruby-config --cc --cflags --ldflags` crash.c `bin/mruby-config --libs` % ./a.out zsh: segmentation fault (core dumped) ./a.out ``` After applying this patch, it will print exception object and exit normally. The `mrb_protect()`, `mrb_ensure()` and `mrb_rescue_exceptions()` in `mrbgems/mruby-error` have been rewritten using `mrb_protect_raw()`.
-
Yukihiro "Matz" Matsumoto authored
- `mrb_exc_backtrace` to implement `Exception#backtrace` - `mrb_get_backtrace` to implement `#caller`
-
Yukihiro "Matz" Matsumoto authored
- add comment for unpacking - avoid saving the symbol in a local variable
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Otherwise we suffer `(unknown):0:` errors.
-
Yukihiro "Matz" Matsumoto authored
On configurations where `sizeof(mrb_int) > sizeof(int)`.
-
- 17 Apr, 2021 3 commits
-
-
Yukihiro "Matz" Matsumoto authored
`MRuby::Presym` no longer needs `Rake::DSL`
-
Yukihiro "Matz" Matsumoto authored
-
KOBAYASHI Shuji authored
-
- 16 Apr, 2021 1 commit
-
-
John Bampton authored
The GitHub Super Linter is a more robust and better supported tool than the current GitHub Actions we are using. Running these checks: ERROR_ON_MISSING_EXEC_BIT: true VALIDATE_BASH: true VALIDATE_BASH_EXEC: true VALIDATE_EDITORCONFIG: true VALIDATE_MARKDOWN: true VALIDATE_SHELL_SHFMT: true VALIDATE_YAML: true https://github.com/marketplace/actions/super-linter https://github.com/github/super-linter Added the GitHub Super Linter badge to the README. Also updated the pre-commit framework and added more documentation on pre-commit. Added one more pre-commit check: check-executables-have-shebangs Added one extra check for merge conflicts to our GitHub Actions. EditorConfig and Markdown linting. Minor grammar and spelling fixes. Update linter.yml
-
- 15 Apr, 2021 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Fix `enable_debug_info?` in `mrbgems/mruby-proc-ext/test/proc.rb`
-
KOBAYASHI Shuji authored
-
- 13 Apr, 2021 4 commits
-
-
Yukihiro "Matz" Matsumoto authored
Fix incorrect prototype on declaration of mrb_protect_atexit
-
Yukihiro "Matz" Matsumoto authored
build(deps): bump actions/cache from v2.1.4 to v2.1.5
-
Ryan Lopopolo authored
`state.c` makes a prototype declaration for the private `mrb_protect_atexit` which is defined in `error.c`. `error.c` defines this function with a void return type, but `state.c` defines the prototype with an `int` return type. This mismatch prevents mruby from compiling on stricter compilers like emscripten.
-
dependabot[bot] authored
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8) Signed-off-by:
dependabot[bot] <support@github.com>
-
- 12 Apr, 2021 5 commits
-
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
- remove `Integer#chr` (thus `mruby-sting-ext`) dependency - fix the behavior when `c.is_a? String` - fix the behavior when `c > 255`
-
Yukihiro "Matz" Matsumoto authored
This CI could consume too much CPU time on GitLab. Maybe we should add resource concious CI configuration on GitLab.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
- 10 Apr, 2021 5 commits
-
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-