"Glass_saga (Masaki Matsushita)" <glass.saga / gmail.com> wrote:
> Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN

I can confirm the issue under 1.9.3-p448 and 2.0.0-p247

> Following code make outbuf "temporarily" locked forever.
> It is needed to ensure rb_str_unlocktmp().

Nasty bug. I might've hit this soon in new project I'm working on(!)

> I have attached two patches.
> One fixes io_fread(), another does io_getpartial() and rb_io_sysread().
> May I commit these changes?

Untested, but looks correct.  Thanks.