diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-15 02:37:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-15 02:37:21 +0000 |
commit | 5e635a367806143e450387393a268c444a290db7 (patch) | |
tree | 27fb350d508f11ea9aad2788dce7dc50eec4c161 /signal.c | |
parent | 0472578b26793e45434769200a806cb6190e5700 (diff) |
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
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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. */ |