summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-25 08:28:28 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-25 08:28:28 +0000
commitc3ec5fd6dafc50485e888c1f6701c6f2f068187a (patch)
treef1076941ad27dc8d360132d0e83a5a3186848b99
parent26154da303cda2658cb6351e0a360d772ffd70d7 (diff)
merge revision(s) 54000: [Backport #12148]
* thread_pthread.c (getstack): __pi_stacksize returned by pthread_getthrds_np() is wrong on AIX. Use __pi_stackend - __pi_stackaddr instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@54264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--thread_pthread.c5
-rw-r--r--version.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f03a1ca97..67ee3b978d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 25 17:28:13 2016 Rei Odaira <Rei.Odaira@gmail.com>
+
+ * thread_pthread.c (getstack): __pi_stacksize returned by
+ pthread_getthrds_np() is wrong on AIX. Use
+ __pi_stackend - __pi_stackaddr instead.
+
Fri Mar 25 17:21:51 2016 Alex Boyd <alex@opengroove.org>
* lib/irb.rb: avoid to needless truncation when using back_trace_limit option.
diff --git a/thread_pthread.c b/thread_pthread.c
index 968c644897..47e94156e1 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -608,7 +608,10 @@ get_stack(void **addr, size_t *size)
&thinfo, sizeof(thinfo),
&reg, &regsiz));
*addr = thinfo.__pi_stackaddr;
- *size = thinfo.__pi_stacksize;
+ /* Must not use thinfo.__pi_stacksize for size.
+ It is around 3KB smaller than the correct size
+ calculated by thinfo.__pi_stackend - thinfo.__pi_stackaddr. */
+ *size = thinfo.__pi_stackend - thinfo.__pi_stackaddr;
STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size));
#else
#error STACKADDR_AVAILABLE is defined but not implemented.
diff --git a/version.h b/version.h
index d41887e7b3..30bd508393 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.9"
#define RUBY_RELEASE_DATE "2016-03-25"
-#define RUBY_PATCHLEVEL 461
+#define RUBY_PATCHLEVEL 462
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 3