summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--cont.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 46a03da..6cf7e47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Aug 30 09:48:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * cont.c (fiber_entry): fix stack allocation failure on Debian
+ GNU/kFreeBSD.
+ Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
+ [Bug #5241] [ruby-core:39147]
+
Tue Aug 30 09:28:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_thread_select): rewrite by using
diff --git a/cont.c b/cont.c
index 1c17eae..3e68d89 100644
--- a/cont.c
+++ b/cont.c
@@ -520,8 +520,9 @@ fiber_entry(void *arg)
/*
* FreeBSD require a first (i.e. addr) argument of mmap(2) is not NULL
* if MAP_STACK is passed.
+ * http://www.FreeBSD.org/cgi/query-pr.cgi?pr=158755
*/
-#if defined(MAP_STACK) && !defined(__FreeBSD__)
+#if defined(MAP_STACK) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
#define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON | MAP_STACK)
#else
#define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON)