Bug #6081

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

Added by Eric Wong over 3 years ago. Updated over 2 years ago.

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

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.

0001-io.c-do_io_advise-raise-exception-without-segfaultin.patch Magnifier (1.58 KB) Eric Wong, 02/25/2012 11:49 AM

Associated revisions

Revision 36933
Added by Motohiro KOSAKI over 2 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]

Revision 36933
Added by Motohiro KOSAKI over 2 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]

History

#1 Updated by Motohiro KOSAKI over 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Motohiro KOSAKI

#2 Updated by Motohiro KOSAKI over 2 years ago

  • Status changed from Assigned to Closed

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

Also available in: Atom PDF