[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...
Issue #14357 has been reported by vo.x (Vit Ondruch).
11 messages
2018/01/15
[#85364] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/03
v.ondruch@tiscali.cz wrote:
[#85368] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/03
Eric Wong wrote:
[#85442] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Eric Wong <normalperson@...>
2018/02/06
Eric Wong <normalperson@yhbt.net> wrote:
[#85451] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults
— Vladimir Makarov <vmakarov@...>
2018/02/06
On 02/06/2018 05:00 AM, Eric Wong wrote:
[#84874] [Ruby trunk Bug#14360] Regression CSV#open method for writing from Ruby 2.4.3 to 2.5.0 — shevegen@...
Issue #14360 has been updated by shevegen (Robert A. Heiler).
3 messages
2018/01/15
[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...
Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).
10 messages
2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/23
hsbt@ruby-lang.org wrote:
[#85081] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/24
Eric Wong <normalperson@yhbt.net> wrote:
[#85082] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/01/24
> Thinking about this even more; I don't think it's possible to
[#85088] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — danieldasilvaferreira@...
Issue #13618 has been updated by dsferreira (Daniel Ferreira).
3 messages
2018/01/25
[#85107] [Ruby trunk Misc#14222] Mutex.lock is not safe inside signal handler: what is? — eregontp@...
Issue #14222 has been updated by Eregon (Benoit Daloze).
3 messages
2018/01/25
[#85136] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...>
samuel@oriontransfer.org wrote:
3 messages
2018/01/26
[ruby-core:84848] [Ruby trunk Feature#14352] Array#pack("M") Quoted-Printable with binary mode
From:
kirika.k2@...
Date:
2018-01-13 01:54:34 UTC
List:
ruby-core #84848
Issue #14352 has been updated by kirika (Toshio Maki).
Description updated
2018/01/13 10:53追記 \rと\nの表記が逆になっていたため訂正しました。
----------------------------------------
Feature #14352: Array#pack("M") Quoted-Printable with binary mode
https://bugs.ruby-lang.org/issues/14352#change-69561
* Author: kirika (Toshio Maki)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
英語で書こうと思ったのですが、うまく伝えられないかもしれないので日本語で書かせてください。すみません。
mail libraryというgemを使ってメールをパースしたり、書きだしたりしているのですが、
Quoted-Printableでエンコードされたバイナリがメールに含まれていた場合に、メールを破壊する
可能性があるということが分かりました。
調査してみると、RubyのArray#Pack("M")を使ったときに、以下のように
\rは=0Dに変換してくれるのですが、\nは=0Aではなく、そのまま\nで維持するのが問題のようで、
mail libraryはパース前の処理に\nを\r\nに変換するという処理を加えるのですが、その時に\nが
\r\nに変換され、オリジナルのバイナリを破壊してしまうことが分かりました。
<pre>
puts ["あいうえお\r\nかきくけこ"].pack('M')
</pre>
実行結果
<pre>
=E3=81=82=E3=81=84=E3=81=86=E3=81=88=E3=81=8A=0D
=E3=81=8B=E3=81=8D=E3=81=8F=E3=81=91=E3=81=93=
</pre>
Quoted-Printableにおいては、レイアウトのための改行は=\r\nにする、ということが決まっているので、
このように\nが単独で残るということはないような気がするのですが、昨年末にまつもとさんにご質問
させていただいた際にPerlの実装を参考にした、ということを伺ったので、Perlについても調べて
みたのですが、Perlは$binmodeというフラグで、バイナリ時の挙動と分けているようです。
http://perldoc.perl.org/MIME/QuotedPrint.html
(もしかすると、参考にした実装とは関係ないかもしれません)
今からpack('M')の挙動を変えると、影響範囲が大きそうなので、バイナリをQuoted-Printableでエンコード
するためのオプションがあれば、いいと思うのですが、packにどういうオプション名をつければよいか、
またpack.cのqpencode関数にbinmode用の拡張しても良いかを含めてご相談させてください。
出来れば今使っているrubyのバージョンは2.3とかだったりするので、2.3.x, 2.4.xにバックポート可能かどうかも
含めて相談させてもらえれば、と思います。
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>