ruby-changes:42351
From: naruse <ko1@a...>
Date: Wed, 30 Mar 2016 02:22:10 +0900 (JST)
Subject: [ruby-changes:42351] naruse:r54425 (ruby_2_3): merge revision(s) 54256, 54291, 54292, 54293: [Backport #12118] [Bug #12218]
naruse 2016-03-30 02:22:04 +0900 (Wed, 30 Mar 2016) New Revision: 54425 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54425 Log: merge revision(s) 54256,54291,54292,54293: [Backport #12118] [Bug #12218] * thread_pthread.c (reserve_stack): fix reserving position where the stack growing bottom to top. [Bug #12118] * localeinit.c (rb_locale_charmap_index): fix prototype. patched by Andreas Schwab [Bug #12218] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/localeinit.c branches/ruby_2_3/thread_pthread.c branches/ruby_2_3/version.h Index: ruby_2_3/thread_pthread.c =================================================================== --- ruby_2_3/thread_pthread.c (revision 54424) +++ ruby_2_3/thread_pthread.c (revision 54425) @@ -693,17 +693,31 @@ reserve_stack(volatile char *limit, size https://github.com/ruby/ruby/blob/trunk/ruby_2_3/thread_pthread.c#L693 const volatile char *end = buf + sizeof(buf); limit += size; if (limit > end) { - size = limit - end; - limit = alloca(size); - limit[stack_check_margin+size-1] = 0; + /* |<-bottom (=limit(a)) top->| + * | .. |<-buf 256B |<-end | stack check | + * | 256B | =size= | margin (4KB)| + * | =size= limit(b)->| 256B | | + * | | alloca(sz) | | | + * | .. |<-buf |<-limit(c) [sz-1]->0> | | + */ + size_t sz = limit - end; + limit = alloca(sz); + limit[sz-1] = 0; } } else { limit -= size; if (buf > limit) { - limit = alloca(buf - limit); - limit[0] = 0; /* ensure alloca is called */ - limit -= stack_check_margin; + /* |<-top (=limit(a)) bottom->| + * | .. | 256B buf->| | stack check | + * | 256B | =size= | margin (4KB)| + * | =size= limit(b)->| 256B | | + * | | alloca(sz) | | | + * | .. | buf->| limit(c)-><0> | | + */ + size_t sz = buf - limit; + limit = alloca(sz); + limit[0] = 0; } } } Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 54424) +++ ruby_2_3/version.h (revision 54425) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.0" #define RUBY_RELEASE_DATE "2016-03-30" -#define RUBY_PATCHLEVEL 69 +#define RUBY_PATCHLEVEL 70 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_3/localeinit.c =================================================================== --- ruby_2_3/localeinit.c (revision 54424) +++ ruby_2_3/localeinit.c (revision 54425) @@ -89,7 +89,7 @@ enc_find_index(const char *name) https://github.com/ruby/ruby/blob/trunk/ruby_2_3/localeinit.c#L89 } int -rb_locale_charmap_index(VALUE klass) +rb_locale_charmap_index(void) { return (int)locale_charmap(enc_find_index); } Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 54424) +++ ruby_2_3/ChangeLog (revision 54425) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Wed Mar 30 02:20:06 2016 NARUSE, Yui <naruse@r...> + + * localeinit.c (rb_locale_charmap_index): fix prototype. + patched by Andreas Schwab [Bug #12218] + +Wed Mar 30 02:20:06 2016 NARUSE, Yui <naruse@r...> + + * thread_pthread.c (reserve_stack): fix reserving position where + the stack growing bottom to top. [Bug #12118] + Wed Mar 30 02:17:33 2016 Nobuyoshi Nakada <nobu@r...> * win32/file.c (rb_readlink): drop garbage after the substitute Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r54256,54291-54293 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/