summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-09 18:12:07 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-09 18:12:07 +0000
commitef73b34c87f52be6a87e0f7ab8d5a03bfcaa983f (patch)
tree9580fb7b6588d65809edee203554d253bb5ccf9b
parent15fbb87b594a47ed622829cfdd6891eb97ea4726 (diff)
merge revision(s) 32542:
* eval.c (ruby_setjmp): need to save the stack after r2 (the Table of Contents on ppc64) is saved onto the stack by getcontext(). based on <https://bugzilla.redhat.com/show_bug.cgi?id=628715>. Bug#4411 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@35995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--eval.c18
-rw-r--r--version.h8
3 files changed, 25 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ac2f87215..9637df1aad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Jun 10 03:00:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (ruby_setjmp): need to save the stack after r2 (the Table
+ of Contents on ppc64) is saved onto the stack by getcontext().
+ based on <https://bugzilla.redhat.com/show_bug.cgi?id=628715>.
+ Bug#4411
+
Thu Jun 7 19:00:35 2012 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported
diff --git a/eval.c b/eval.c
index c350159e3e..4458dff223 100644
--- a/eval.c
+++ b/eval.c
@@ -179,6 +179,9 @@ int function_call_may_return_twice_false_2 = 0;
(function_call_may_return_twice_false_2 ? \
setjmp(function_call_may_return_twice_jmp_buf) : \
0)
+# elif defined(__PPC64__)
+# define JUST_BEFORE_SETJMP(extra_save, j) ((void)0)
+# define JUST_AFTER_SETJMP(extra_save, j) ((j)->status ? (void)0 : (extra_save))
# elif defined(__FreeBSD__) && __FreeBSD__ < 7
/*
* workaround for FreeBSD/i386 getcontext/setcontext bug.
@@ -196,16 +199,23 @@ static int volatile freebsd_clear_carry_flag = 0;
# ifndef POST_GETCONTEXT
# define POST_GETCONTEXT 0
# endif
+# ifndef JUST_BEFORE_SETJMP
+# define JUST_BEFORE_SETJMP(extra_save, j) (extra_save)
+# endif
+# ifndef JUST_AFTER_SETJMP
+# define JUST_AFTER_SETJMP(extra_save, j) ((void)0)
+# endif
# define ruby_longjmp(env, val) rb_jump_context(env, val)
-# define ruby_setjmp(just_before_setjmp, j) ((j)->status = 0, \
- (just_before_setjmp), \
+# define ruby_setjmp(extra_save, j) ((j)->status = 0, \
+ JUST_BEFORE_SETJMP(extra_save, j), \
PRE_GETCONTEXT, \
getcontext(&(j)->context), \
POST_GETCONTEXT, \
+ JUST_AFTER_SETJMP(extra_save, j), \
(j)->status)
#else
-# define ruby_setjmp(just_before_setjmp, env) \
- ((just_before_setjmp), RUBY_SETJMP(env))
+# define ruby_setjmp(extra_save, env) \
+ ((extra_save), RUBY_SETJMP(env))
# define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
# ifdef __CYGWIN__
int _setjmp(), _longjmp();
diff --git a/version.h b/version.h
index 7a53a5c6f6..6341599f01 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2012-06-07"
+#define RUBY_RELEASE_DATE "2012-06-10"
#define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20120607
-#define RUBY_PATCHLEVEL 367
+#define RUBY_RELEASE_CODE 20120610
+#define RUBY_PATCHLEVEL 368
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_YEAR 2012
#define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 7
+#define RUBY_RELEASE_DAY 10
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];