Skip to content

Commit ef73b34

Browse files
committed
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
1 parent 15fbb87 commit ef73b34

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Sun Jun 10 03:00:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* eval.c (ruby_setjmp): need to save the stack after r2 (the Table
4+
of Contents on ppc64) is saved onto the stack by getcontext().
5+
based on <https://bugzilla.redhat.com/show_bug.cgi?id=628715>.
6+
Bug#4411
7+
18
Thu Jun 7 19:00:35 2012 Kenta Murata <mrkn@mrkn.jp>
29

310
* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported

eval.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ int function_call_may_return_twice_false_2 = 0;
179179
(function_call_may_return_twice_false_2 ? \
180180
setjmp(function_call_may_return_twice_jmp_buf) : \
181181
0)
182+
# elif defined(__PPC64__)
183+
# define JUST_BEFORE_SETJMP(extra_save, j) ((void)0)
184+
# define JUST_AFTER_SETJMP(extra_save, j) ((j)->status ? (void)0 : (extra_save))
182185
# elif defined(__FreeBSD__) && __FreeBSD__ < 7
183186
/*
184187
* workaround for FreeBSD/i386 getcontext/setcontext bug.
@@ -196,16 +199,23 @@ static int volatile freebsd_clear_carry_flag = 0;
196199
# ifndef POST_GETCONTEXT
197200
# define POST_GETCONTEXT 0
198201
# endif
202+
# ifndef JUST_BEFORE_SETJMP
203+
# define JUST_BEFORE_SETJMP(extra_save, j) (extra_save)
204+
# endif
205+
# ifndef JUST_AFTER_SETJMP
206+
# define JUST_AFTER_SETJMP(extra_save, j) ((void)0)
207+
# endif
199208
# define ruby_longjmp(env, val) rb_jump_context(env, val)
200-
# define ruby_setjmp(just_before_setjmp, j) ((j)->status = 0, \
201-
(just_before_setjmp), \
209+
# define ruby_setjmp(extra_save, j) ((j)->status = 0, \
210+
JUST_BEFORE_SETJMP(extra_save, j), \
202211
PRE_GETCONTEXT, \
203212
getcontext(&(j)->context), \
204213
POST_GETCONTEXT, \
214+
JUST_AFTER_SETJMP(extra_save, j), \
205215
(j)->status)
206216
#else
207-
# define ruby_setjmp(just_before_setjmp, env) \
208-
((just_before_setjmp), RUBY_SETJMP(env))
217+
# define ruby_setjmp(extra_save, env) \
218+
((extra_save), RUBY_SETJMP(env))
209219
# define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
210220
# ifdef __CYGWIN__
211221
int _setjmp(), _longjmp();

version.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#define RUBY_VERSION "1.8.7"
2-
#define RUBY_RELEASE_DATE "2012-06-07"
2+
#define RUBY_RELEASE_DATE "2012-06-10"
33
#define RUBY_VERSION_CODE 187
4-
#define RUBY_RELEASE_CODE 20120607
5-
#define RUBY_PATCHLEVEL 367
4+
#define RUBY_RELEASE_CODE 20120610
5+
#define RUBY_PATCHLEVEL 368
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8
99
#define RUBY_VERSION_TEENY 7
1010
#define RUBY_RELEASE_YEAR 2012
1111
#define RUBY_RELEASE_MONTH 6
12-
#define RUBY_RELEASE_DAY 7
12+
#define RUBY_RELEASE_DAY 10
1313

1414
#ifdef RUBY_EXTERN
1515
RUBY_EXTERN const char ruby_version[];

0 commit comments

Comments
 (0)