Issue #4983 has been reported by Motohiro KOSAKI.

----------------------------------------
Bug #4983: Fiber?????????????設???????????????
http://redmine.ruby-lang.org/issues/4983

Author: Motohiro KOSAKI
Status: Assigned
Priority: Normal
Assignee: Motohiro KOSAKI
Category: core
Target version: 1.9.3
ruby -v: trunk


以?????????????????????????????????設??????????????????????????????????PROT_READ|PROT_WRITE?????
???????????????????????????????????????????????????????


static VALUE*
fiber_machine_stack_alloc(size_t size)
{
    VALUE *ptr;
(snip)
    }
    else {
	void *page;
	STACK_GROW_DIR_DETECTION;
	ptr = (VALUE*)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
	if (ptr == (VALUE*)(SIGNED_VALUE)-1) {
	    rb_raise(rb_eFiberError, "can't alloc machine stack to fiber");
	}
	page = ptr + STACK_DIR_UPPER((size - RB_PAGE_SIZE) / sizeof(VALUE), 0);
	if (mprotect(page, RB_PAGE_SIZE, PROT_READ | PROT_WRITE) < 0) {        // ???????
	    rb_raise(rb_eFiberError, "mprotect failed");



-- 
http://redmine.ruby-lang.org