diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-01-09 14:24:38 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2026-01-09 20:02:54 +0900 |
| commit | c794a97940a36269cffcb6ad35ef7ff209fe2720 (patch) | |
| tree | 0e765da5a7fd20739c8b20d5e1c046771121f2b4 | |
| parent | e01e13c23999f0e43d8a0874003c73a1cdd68f1e (diff) | |
Rename `alloca_overflow` to `stack_overflow`
`alloca` is an implementation detail to raise a stack overflow.
| -rw-r--r-- | ext/-test-/stack/stack.c | 4 | ||||
| -rw-r--r-- | test/-ext-/stack/test_stack_overflow.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/-test-/stack/stack.c b/ext/-test-/stack/stack.c index 8ff32f9737..f0e65e74b2 100644 --- a/ext/-test-/stack/stack.c +++ b/ext/-test-/stack/stack.c @@ -2,7 +2,7 @@ #include "internal/string.h" static VALUE -stack_alloca_overflow(VALUE self) +stack_overflow(VALUE self) { size_t i = 0; @@ -30,6 +30,6 @@ asan_p(VALUE klass) void Init_stack(VALUE klass) { - rb_define_singleton_method(rb_cThread, "alloca_overflow", stack_alloca_overflow, 0); + rb_define_singleton_method(rb_cThread, "stack_overflow", stack_overflow, 0); rb_define_singleton_method(rb_cThread, "asan?", asan_p, 0); } diff --git a/test/-ext-/stack/test_stack_overflow.rb b/test/-ext-/stack/test_stack_overflow.rb index 8eddec6ab5..3d7f00331d 100644 --- a/test/-ext-/stack/test_stack_overflow.rb +++ b/test/-ext-/stack/test_stack_overflow.rb @@ -17,7 +17,7 @@ class Test_StackOverflow < Test::Unit::TestCase require '-test-/stack' assert_raise(SystemStackError) do - Thread.alloca_overflow + Thread.stack_overflow end RUBY end @@ -29,7 +29,7 @@ class Test_StackOverflow < Test::Unit::TestCase thread = Thread.new do Thread.current.report_on_exception = false - Thread.alloca_overflow + Thread.stack_overflow end assert_raise(SystemStackError) do @@ -44,7 +44,7 @@ class Test_StackOverflow < Test::Unit::TestCase GC.disable fiber = Fiber.new do - Thread.alloca_overflow + Thread.stack_overflow end assert_raise(SystemStackError) do |
