From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2023-07-22T04:26:24+00:00 Subject: [ruby-core:114261] [Ruby master Bug#19640] `IO#puts` can generate zero length iov which can cause rb_bug crash. Issue #19640 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED to 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: DONE ruby_3_2 ea89527a76a84741463c304246db2dd3a5df845b merged revision(s) 0b2613f44309bddae45562c9f3a14ed43e56959b. ---------------------------------------- Bug #19640: `IO#puts` can generate zero length iov which can cause rb_bug crash. https://bugs.ruby-lang.org/issues/19640#change-103952 * Author: ioquatix (Samuel Williams) * Status: Closed * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: DONE ---------------------------------------- In the fiber scheduler, `IO#puts ""` or `IO#puts nil` can generate a zero length `iov` which causes `io_binwritev_internal` to fail since the result is zero. We need to fix `IO#puts` so that it does not generate zero length writes, but also we fix `io_binwritev_internal` to handle this case more robustly. Fix: https://github.com/ruby/ruby/pull/7806/files -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/