summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 15:40:56 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 15:40:56 +0000
commitf22359adcc35ef08842594cdaa073eb67f4014ae (patch)
treebe2f5fbde02957f59c5c3e130fadc202dcfb28d2
parent3aa4a0b9f6df48c3594715421c88a616e0752f4d (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_2@54323 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 ce64d0dff0..d076c428de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Mar 29 00:33:06 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.
+
Tue Mar 29 00:06:58 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 2a47efedd3..d3162993b8 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -613,7 +613,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 19ddb19bd6..71e3b0879f 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.5"
#define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 265
+#define RUBY_PATCHLEVEL 266
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 3