[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...

Issue #11420 has been reported by Koichi Sasada.

11 messages 2015/08/06

[ruby-core:70397] [Ruby trunk - Bug #11444] STDIN.each_codepoint hangs indefinitely on certain codepoints

From: andrew@...
Date: 2015-08-15 03:30:33 UTC
List: ruby-core #70397
Issue #11444 has been updated by Andrew Cantino.


Nobuyoshi Nakada wrote:
> Applied in changeset r51583.
> 
> ----------
> io.c: read more data
> 
> * io.c (rb_io_each_codepoint): read more data when read partially.
>   [ruby-core:70379] [Bug #11444]

Thank you for fixing this, and in less than 24 hours!

----------------------------------------
Bug #11444: STDIN.each_codepoint hangs indefinitely on certain codepoints
https://bugs.ruby-lang.org/issues/11444#change-53799

* Author: Andrew Cantino
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0dev (2015-08-13 trunk 51569) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
Piping certain Unicode data into Ruby and calling `each_codepoint` on `STDIN` results in a hang.  Control-c does not exit, but control-z will.  I've tested this in 2.2.0, 2.2.2, and trunk.

Please see https://gist.github.com/cantino/48f977bee6a39e33f80f for reproduction.  There is an example file with various Unicode Emoji characters in it (borrowed from http://apps.timwhitlock.info/emoji/tables/unicode).

I'd like to help fix this if anyone can point me in the right direction.  I fiddled with the file until I found a state where it works if one character is removed from the front of the file, so hopefully that's useful information.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next