diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-26 09:09:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-26 09:09:45 +0000 |
commit | 767d70841a998c16a7487f9b286a9a944f69e7b7 (patch) | |
tree | f7ad13b6a798af772e149f24cd140872871cc88a /thread_win32.c | |
parent | 67d7448fca92474e2701e4ca973c03dbb06b4690 (diff) |
* Makefile.in (ASFLAGS): needs INCFLAGS.
* configure.in (rb_cv_dynamic_alloca): check if extra source for
dynamic size alloca.
* missing/x86_64-chkstk.s (___chkstk): necessary for alloca of
amd64-mingw32msvc-gcc on Ubutu.
* thread_win32.c (ruby_alloca_chkstk): check stack overflow
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.c')
-rw-r--r-- | thread_win32.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c index 46764f0988..d9f006a995 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -597,4 +597,17 @@ native_reset_timer_thread(void) } } +#ifdef RUBY_ALLOCA_CHKSTK +void +ruby_alloca_chkstk(size_t len, void *sp) +{ + if (ruby_stack_length(NULL) * sizeof(VALUE) >= len) { + rb_thread_t *th = GET_THREAD(); + if (!rb_thread_raised_p(th, RAISED_STACKOVERFLOW)) { + rb_thread_raised_set(th, RAISED_STACKOVERFLOW); + rb_exc_raise(sysstack_error); + } + } +} +#endif #endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */ |