From 3ffa44622db2386727a8e11bb3aeb0385621f9fa Mon Sep 17 00:00:00 2001 From: kosaki Date: Tue, 30 Aug 2011 00:51:46 +0000 Subject: * cont.c (fiber_entry): fix stack allocation failure on Debian GNU/kFreeBSD. Patch by Lucas Nussbaum . [Bug #5241] [ruby-core:39147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ cont.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 46a03da6d2..6cf7e473d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Aug 30 09:48:07 2011 KOSAKI Motohiro + + * cont.c (fiber_entry): fix stack allocation failure on Debian + GNU/kFreeBSD. + Patch by Lucas Nussbaum . + [Bug #5241] [ruby-core:39147] + Tue Aug 30 09:28:01 2011 KOSAKI Motohiro * thread.c (rb_thread_select): rewrite by using diff --git a/cont.c b/cont.c index 1c17eaeed1..3e68d897ca 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) -- cgit v1.2.3