summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-01-12 23:56:29 +0900
committerKoichi Sasada <ko1@atdot.net>2023-01-13 09:30:29 +0900
commit2e7bceb34ea858649e1f975a934ce1894d1f06a6 (patch)
tree823a13cfbd0883b61a2688717324c9467f45a8b6 /vm_core.h
parent537183cd2ac0163851277b46a2f21ea5914c11c0 (diff)
downloadruby-2e7bceb34ea858649e1f975a934ce1894d1f06a6.tar.gz
Do not use VM stack for splat arg on cfunc
On the cfunc methods, if a splat argument is given, all array elements are expanded on the VM stack and it can cause SystemStackError. The idea to avoid it is making a hidden array to contain all parameters and use this array as an argv. This patch is reviesed version of https://github.com/ruby/ruby/pull/6816 The main change is all changes are closed around calling cfunc logic. Fixes [Bug #4040] Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 4f6e07d818..1f5c56aa17 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -297,7 +297,7 @@ struct rb_calling_info {
VALUE block_handler;
VALUE recv;
int argc;
- int kw_splat;
+ bool kw_splat;
};
struct rb_execution_context_struct;