Bug #5727

Hidden bug in load.c rb_feature_p

Added by Yura Sokolov over 2 years ago. Updated over 2 years ago.

[ruby-core:41545]
Status:Closed
Priority:Normal
Assignee:-
Category:core
Target version:1.9.3
ruby -v:ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] Backport:

Description

lazy assigned loadpath searched in loadingtable were not expanded
(http://redmine.ruby-lang.org/projects/ruby-trunk/repository/revisions/33027/entry/load.c#L186),
but all features, pushed to loading table, are expanded.

This bug is hidden because loadpath is allways filled in loadedfeatures loop
(http://redmine.ruby-lang.org/projects/ruby-trunk/repository/revisions/33027/entry/load.c#L160),
but if we try to optimize this loop (#5427), then load_path could be not filled, and bug exposed.

(pull request on github https://github.com/ruby/ruby/pull/63 )

load.c.patch Magnifier (469 Bytes) Yura Sokolov, 12/08/2011 04:15 PM

Associated revisions

Revision 34013
Added by Nobuyoshi Nakada over 2 years ago

  • load.c (rbfeaturep): lazy assigned loadpath searched in loadingtable were not expanded, but all features, pushed to loading table, are expanded. a patch by Yura Sokolov in . [Bug #5727]

History

#1 Updated by Nobuyoshi Nakada over 2 years ago

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

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


  • load.c (rbfeaturep): lazy assigned loadpath searched in loadingtable were not expanded, but all features, pushed to loading table, are expanded. a patch by Yura Sokolov in . [Bug #5727]

Also available in: Atom PDF