[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

Re: [BUG] segfault on Proc#call after setting a trace_func

From: ts <decoux@...>
Date: 2006-05-06 11:59:06 UTC
List: ruby-core #7834
>>>>> "M" == Mauricio Fernandez <mfp@acm.org> writes:

M> l.call

 Not sure, but it seems to be in proc_invoke()

    /* modify current frame */
    ruby_frame->block = &_block;
    PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
    state = EXEC_TAG();
    if (state == 0) {
	proc_set_safe_level(proc);
	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
			    pcall | YIELD_PROC_CALL, avalue);
    }
    else if (TAG_DST()) {
	result = prot_tag->retval;
    }
    POP_TAG();
    ruby_wrapper = old_wrapper;
    POP_VARS();


 Unfortunately the old block (ruby_frame->block) is never restored when
 ruby leave proc_invoke()

 Now when it call call_trace_func()

    PUSH_TAG(PROT_NONE);


 will create a 'struct tag'  which "overlap" with the variable _block (which
 is out of scope because ruby has leaved proc_invoke()) and this is at
 this step that it erase some fields in the struct BLOCK and it crash when
 it try a call to rb_f_binding()


Guy Decoux

In This Thread