From a00a394e96e43564fa120112a2549880431675fd Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 15 Apr 2017 02:37:21 +0000 Subject: signal.c: last tag page condition * signal.c (check_stack_overflow): drop the last tag when it is close to the fault page, not same as sp page. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'signal.c') diff --git a/signal.c b/signal.c index 2c37928256..412782e44f 100644 --- a/signal.c +++ b/signal.c @@ -843,7 +843,7 @@ check_stack_overflow(int sig, const uintptr_t addr, const ucontext_t *ctx) if (sp_page == fault_page || sp_page == fault_page + 1 || sp_page <= fault_page && fault_page <= bp_page) { rb_thread_t *th = ruby_current_thread; - if ((uintptr_t)th->tag->buf / pagesize == sp_page) { + if ((uintptr_t)th->tag->buf / pagesize <= fault_page + 1) { /* drop the last tag if it is close to the fault, * otherwise it can cause stack overflow again at the same * place. */ -- cgit v1.2.3