Closed koron closed 7 years ago
printStr()
で unsafe を使うのをやめたら落ちなくなった。
func printStr(s string) {
printBytes([]byte(s))
}
なおしまーす
これ、goのほうでレイアウト変わって、単なるキャストじゃ済まなくなったってことですか?
んー。わからんす。
@zchee さんから似たような話を聞きました。
released
ありがとうございます :bowing_man:
こちらこそ
reflectでちゃんとヘッダとかを作れば1.9でも大丈夫だったはずです
少しだけ追ったのでその報告です。不要かもですが。1.9 から unix に poll.Fd という型が増えて、その Write() の中で p[0:len(p)]
相当をやってるところがあって、そこで落ちてました。
jvgrep の出す文字列は細かい文字列の方が多く reflect でヘッダ付けたりすると逆に速度劣化につながりそうなのでひとまず []byte キャストにしました。ありがとうございます。
:bow:
Xubuntu 17.04 + go1.9 (official binary) で HEAD の jvgrep をビルドして実行した結果、以下のように crash しています。詳細は不明。 Windows では再現できていません。