summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext/src/proc.c
diff options
context:
space:
mode:
authordearblue <[email protected]>2021-11-22 21:39:39 +0900
committerdearblue <[email protected]>2021-11-22 21:55:02 +0900
commitb02bd63dc5cd4918230fed3344bc71e2e5540087 (patch)
tree99833d05fc9f4c5281a5f58eb24898e3be066f76 /mrbgems/mruby-proc-ext/src/proc.c
parent01cadd3e706c1713a7b77e2e214df2d1695f875f (diff)
downloadmruby-b02bd63dc5cd4918230fed3344bc71e2e5540087.tar.gz
mruby-b02bd63dc5cd4918230fed3344bc71e2e5540087.zip
Fixed occurs `SIGSEGV` with `mrbgems/mruby-method`
Calling the `Method#{parameters,source_location}` method on a static `Proc` object resulted in `SIGSEGV`. The trigger is https://github.com/mruby/mruby/pull/5402. The original implementation of the `Method#{parameters,source_location}` method was to temporarily rewrite the object and then call the method of the same name in `Proc`. Rewriting of objects placed in the ROM section by #5402 above is prohibited by hardware such as the CPU. This caused a `SIGSEGV`.
Diffstat (limited to 'mrbgems/mruby-proc-ext/src/proc.c')
-rw-r--r--mrbgems/mruby-proc-ext/src/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c
index 9d8a7b037..ac89db193 100644
--- a/mrbgems/mruby-proc-ext/src/proc.c
+++ b/mrbgems/mruby-proc-ext/src/proc.c
@@ -92,7 +92,7 @@ mrb_kernel_proc(mrb_state *mrb, mrb_value self)
* prc.parameters #=> [[:req, :x], [:opt, :y], [:rest, :other]]
*/
-static mrb_value
+mrb_value
mrb_proc_parameters(mrb_state *mrb, mrb_value self)
{
struct parameters_type {