diff options
author | Koichi Sasada <ko1@atdot.net> | 2023-01-12 23:56:29 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2023-01-13 09:30:29 +0900 |
commit | 2e7bceb34ea858649e1f975a934ce1894d1f06a6 (patch) | |
tree | 823a13cfbd0883b61a2688717324c9467f45a8b6 /vm_core.h | |
parent | 537183cd2ac0163851277b46a2f21ea5914c11c0 (diff) |
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>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7109
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |