mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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
This commit is contained in:
parent
67d7448fca
commit
767d70841a
5 changed files with 60 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue