Don't check for stack overflow when ec is NULL

This commit is contained in:
John Hawthorn 2025-08-14 17:32:13 -07:00
parent a04555c8ab
commit 8404c4668d

View file

@ -877,6 +877,8 @@ static void
check_stack_overflow(int sig, const void *addr)
{
int ruby_stack_overflowed_p(const rb_thread_t *, const void *);
rb_execution_context_t *ec = rb_current_execution_context(false);
if (!ec) return;
rb_thread_t *th = GET_THREAD();
if (ruby_stack_overflowed_p(th, addr)) {
reset_sigmask(sig);