Project

General

Profile

Backport #5593

Windows上で \\.\ から始まるデバイスをopenするとクラッシュ

Added by dearblue (宗介 相良) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-dev:44837]

Description

Windows 上で \.\ から始まるデバイスを open すると ruby がクラッシュします。

ruby -e "open('//./c:', 'rb:binary')"
-e:1: [BUG] rb_update_max_fd: invalid fd (3) given.
.... なんたらかんたら ....

原因は io.c の rb_update_max_fd で呼ばれる fstat が、デバイス fd を与えると常に失敗するためのようです。

対応をお願いします。


Related issues

Related to Ruby master - Bug #5591: Windows bug when using "shortcut" syntax with output redirectionClosed11/08/2011Actions

Associated revisions

Revision c88d3561
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 33692
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

Revision 25f531a9
Added by usa (Usaku NAKAMURA) over 7 years ago

merge revision(s) 33691,33692

[Backport #5593]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34437
Added by usa (Usaku NAKAMURA) over 7 years ago

merge revision(s) 33691,33692

[Backport #5593]

Revision 234753ae
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 33691,33692:

    * io.c (rb_update_max_fd): fstat(2) can fail with other than
      EBADF.  [ruby-dev:44837] [Backport #4339].  Cf.
      http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
      EBADF.  [ruby-dev:44837] [Bug #5593].  Cf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34445
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 33691,33692:

* io.c (rb_update_max_fd): fstat(2) can fail with other than
  EBADF.  [ruby-dev:44837] [Backport #4339].  Cf.
  http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
  EBADF.  [ruby-dev:44837] [Bug #5593].  Cf.

History

Updated by usa (Usaku NAKAMURA) almost 8 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)

Updated by usa (Usaku NAKAMURA) almost 8 years ago

正当なfdなんだけどfstat()できないものもあるという事態なんですが、
どーすればいいでしょうか?>arkさん

Updated by usa (Usaku NAKAMURA) almost 8 years ago

  • ruby -v changed from ruby 1.9.3p0 (2011-10-30) [i386-mingw32] to -

こんにちは、なかむら(う)です。

In message "[ruby-dev:44844] [ruby-trunk - Bug #5593] Windows上で \.\ から始まるデバイスをopenするとクラッシュ"
on Nov.09,2011 16:48:02, usa@garbagecollect.jp wrote:

正当なfdなんだけどfstat()できないものもあるという事態なんですが、
どーすればいいでしょうか?>arkさん

大変失礼しました。akrさん宛です。

それでは。
--
U.Nakamura usa@garbagecollect.jp

#4

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33692.
宗介, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


#5

Updated by usa (Usaku NAKAMURA) almost 8 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (core)
  • Status changed from Closed to Open
  • Assignee deleted (usa (Usaku NAKAMURA))
  • Target version deleted (1.9.3)

Updated by kosaki (Motohiro KOSAKI) over 7 years ago

Usaさん、

redmineに記録されてるコミットはr33692だけですが、これはコードを一行も変えてないので、
backport requestは r33691 と r33692 の2コミットに対してなされていると推測していますが
あっていますか?勝手に推測して間違っていると目も当てられないのでお手数ですが確認お願い出来ますでしょうか。

#7

Updated by usa (Usaku NAKAMURA) over 7 years ago

  • Status changed from Open to Closed

This issue was solved with changeset r34437.
宗介, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 33691,33692

[Backport #5593]

Also available in: Atom PDF