2011/9/13 Eric Wong <normalperson / yhbt.net>:
> Motohiro KOSAKI <kosaki.motohiro / gmail.com> wrote:
>> File old_thread_select.patch added
>>
>> > static void
>> > rb_fd_rcopy(fd_set *dst, rb_fdset_t *src)
>> > {
>> > =A0 =A0 size_t size =3D howmany(rb_fd_max(src), NFDBITS) * sizeof(fd_m=
ask);
>> > =A0 =A0 if (size < sizeof(fd_set)) size =3D sizeof(fd_set);
>> > =A0 =A0 memcpy(dst, rb_fd_ptr(src), size);
>> > }
>>
>> If size > sizeof(fd_set), this code makes memory corruption.
>
> I just thought of this again and think rb_bug() is better than
> rb_raise() here. =A0While unlikely to hit either case, rb_raise()
> will leak memory since the rb_fd_term() call gets skipped.

It's a option. However I'll keep this because current one can handle
an error by caller.
but rb_bug() is more catastrophic.

Anyway, current caller never hit this arugment check. therefore this
is nitpick and no
worth to change 193 IMHO.