From: Tetsu Soh Date: 2009-06-05T16:03:08+09:00 Subject: [ruby-core:23713] [Bug]Is this a bug about thread_reset_event_flags? This is a multi-part message in MIME format. ------=_NextPart_000_0029_01C9E5F7.11AC5800 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, In the Ruby1.9, I found the following function in thread.c file: static void thread_reset_event_flags(rb_thread_t *th) { rb_event_hook_t *hook = th->event_hooks; rb_event_flag_t flag = th->event_flags & RUBY_EVENT_VM; while (hook) { flag |= hook->flag; // problem[1] hook = hook->next; } } In the line [1] the value of flag is assigned to a local variable. But never set back to th->event_flags. Thus the value of th->event_flags before and after line [1] is never changed. This is a bug? Thanks and Best regards, Tetsu ------=_NextPart_000_0029_01C9E5F7.11AC5800 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

In = the Ruby1.9, I found the following function in thread.c file:

 

static = void

thread_reset_event_flags(rb_thread_t = *th)

{

    = rb_event_hook_t *hook =3D th->event_hooks;

    = rb_event_flag_t flag =3D th->event_flags & RUBY_EVENT_VM;

 

    while (hook) = {

        flag |=3D hook->flag; // problem[1]

        hook =3D hook->next;

    = }

}

 

In = the line [1] the value of flag is assigned to a local variable. But never set back to th->event_flags.

Thus = the value of th->event_flags before and after line [1] is never changed. =

 

This = is a bug?

 

Thanks and

Best = regards,

Tetsu

 

------=_NextPart_000_0029_01C9E5F7.11AC5800--