Project

General

Profile

Actions

Bug #5727

closed

Hidden bug in load.c rb_feature_p

Added by funny_falcon (Yura Sokolov) over 12 years ago. Updated over 12 years ago.

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

Description

lazy assigned load_path searched in loading_table 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 load_path is allways filled in loaded_features 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 )


Files

load.c.patch (469 Bytes) load.c.patch funny_falcon (Yura Sokolov), 12/08/2011 04:15 PM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 12 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 (rb_feature_p): lazy assigned load_path searched in
    loading_table were not expanded, but all features, pushed to
    loading table, are expanded. a patch by Yura Sokolov
    <funny.falcon AT gmail.com> in [ruby-core:41545]. [Bug #5727]
Actions

Also available in: Atom PDF

Like0
Like0