summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gc.c9
-rw-r--r--version.h2
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a7aa08cfe..ca6af2ab2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 8 05:32:45 2008 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).
+
Sun Jun 8 05:24:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (RUBY_CHECK_VARTYPE): check if a variable is defined
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
diff --git a/version.h b/version.h
index ced1a5f9cd..1e653ce6d4 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-08"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080608
-#define RUBY_PATCHLEVEL 159
+#define RUBY_PATCHLEVEL 160
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8