Skip to content

Commit c794a97

Browse files
committed
Rename alloca_overflow to stack_overflow
`alloca` is an implementation detail to raise a stack overflow.
1 parent e01e13c commit c794a97

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ext/-test-/stack/stack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "internal/string.h"
33

44
static VALUE
5-
stack_alloca_overflow(VALUE self)
5+
stack_overflow(VALUE self)
66
{
77
size_t i = 0;
88

@@ -30,6 +30,6 @@ asan_p(VALUE klass)
3030
void
3131
Init_stack(VALUE klass)
3232
{
33-
rb_define_singleton_method(rb_cThread, "alloca_overflow", stack_alloca_overflow, 0);
33+
rb_define_singleton_method(rb_cThread, "stack_overflow", stack_overflow, 0);
3434
rb_define_singleton_method(rb_cThread, "asan?", asan_p, 0);
3535
}

test/-ext-/stack/test_stack_overflow.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_overflow
1717
require '-test-/stack'
1818
1919
assert_raise(SystemStackError) do
20-
Thread.alloca_overflow
20+
Thread.stack_overflow
2121
end
2222
RUBY
2323
end
@@ -29,7 +29,7 @@ def test_thread_stack_overflow
2929
3030
thread = Thread.new do
3131
Thread.current.report_on_exception = false
32-
Thread.alloca_overflow
32+
Thread.stack_overflow
3333
end
3434
3535
assert_raise(SystemStackError) do
@@ -44,7 +44,7 @@ def test_fiber_stack_overflow
4444
GC.disable
4545
4646
fiber = Fiber.new do
47-
Thread.alloca_overflow
47+
Thread.stack_overflow
4848
end
4949
5050
assert_raise(SystemStackError) do

0 commit comments

Comments
 (0)