summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 04:47:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 04:47:24 +0000
commit1202462b6ff80c1ef94d6a50198c609e8bbee236 (patch)
tree99c9e671d34f12e54436d1db34b56c218db0a5ea
parent12320eb505714627b297d48660bf704404182337 (diff)
* gc.c (stack_end_address): use local variable address instead of
__builtin_frame_address(0) to avoid SEGV on SunOS 5.11 on x86 with gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--gc.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b7d5574eff..db7dd1b854 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Dec 17 13:43:15 2007 Tanaka Akira <akr@fsij.org>
+
+ * gc.c (stack_end_address): use local variable address instead of
+ __builtin_frame_address(0) to avoid SEGV on SunOS 5.11 on x86 with
+ gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802).
+
Mon Dec 17 12:21:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Makefile.in (RUNRUBY): added RUNRUBYOPT.
diff --git a/gc.c b/gc.c
index 4298a8acf1..a04804902a 100644
--- a/gc.c
+++ b/gc.c
@@ -438,12 +438,13 @@ static unsigned int STACK_LEVEL_MAX = 655300;
# if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
__attribute__ ((noinline))
# endif
-static VALUE *
-stack_end_address(void)
+static void
+stack_end_address(VALUE **stack_end_p)
{
- return (VALUE *)__builtin_frame_address(0);
+ VALUE stack_end;
+ *stack_end_p = &stack_end;
}
-# define SET_STACK_END VALUE *stack_end = stack_end_address()
+# define SET_STACK_END VALUE *stack_end; stack_end_address(&stack_end)
# else
# define SET_STACK_END VALUE *stack_end = alloca(1)
# endif