Project

General

Profile

Bug #6081

[PATCH] io.c (do_io_advise): raise exception without segfaulting

Added by normalperson (Eric Wong) over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-02-25 trunk 34796) [x86_64-linux]
Backport:
[ruby-core:42880]

Description

IO objects (e.g. pipes) may have Qnil for fptr->pathv. Calling
RSTRING_PTR on Qnil is unsafe and causes a segmentation fault.

This issue also affects 1.9.3 and will need to be backported.


Files

Associated revisions

Revision fde6de9f
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

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

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

Revision 36933
Added by kosaki (Motohiro KOSAKI) almost 7 years ago

  • test/ruby/test_io.rb (test_advise_pipe): new test to check io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880]

History

Updated by kosaki (Motohiro KOSAKI) over 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to kosaki (Motohiro KOSAKI)

Updated by kosaki (Motohiro KOSAKI) almost 7 years ago

  • Status changed from Assigned to Closed

This issue was fixed at 34825. Sorry for the delay!

Also available in: Atom PDF