Merge pull request #5914 from dearblue/doc/mruby3.2.md

Update mruby3.2.md for changes behavior of `mrb_vm_run()`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-01-22 22:49:57 +09:00
committed by GitHub
+18
View File
@@ -37,6 +37,24 @@
- mruby-dir from [https://github.com/iij/mruby-dir.git]
- mruby-data
# Breaking Changes
## `mrb_vm_run()` may detach top-level local variables referenced from blocks
When the `mrb_vm_run()` function (including `mrb_top_run()`) is called,
the previous top-level local variables referenced from blocks is detached under either of the following conditions.
- If the `stack_keep` parameter is given as 0.
- If the number of variables in `irep` to be executed is less than the number of previous top-level local variables.
This change also affects API functions such as `mrb_load_string()` and `mrb_load_file()`.
The conditions under which the previous top-level local variables referenced from blocks is detached in these functions are as follows:
- If the function has no `mrbc_context` pointer parameter, or the `mrbc_context` pointer parameter is set to `NULL`.
- If the number of variables held in the `mrbc_context` pointer is less than the number of previous top-level local variables.
Intentional reliance on previous behavior may cause compatibility problems in your application.
# CVEs
Following CVEs are fixed.