Project

General

Profile

Bug #10828

send should not create immortal symbols

Added by marcandre (Marc-Andre Lafortune) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:68008]

Description

While public_send is ok, send and __send__ create immortal symbols when they shouldn't.

Associated revisions

Revision 49500
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]

Revision 49500
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]

Revision 49500
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]

Revision 49500
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]

Revision 49500
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]

Revision 49501
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]

Revision 49501
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]

Revision 49501
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]

Revision 49501
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]

Revision 49501
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]

Revision 49502
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97) Creates a regression in test_drb. Above my rubyfu. [#10828]

Revision 49502
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97) Creates a regression in test_drb. Above my rubyfu. [#10828]

Revision 49502
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97) Creates a regression in test_drb. Above my rubyfu. [#10828]

Revision 49502
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97) Creates a regression in test_drb. Above my rubyfu. [#10828]

Revision 49502
Added by marcandre (Marc-Andre Lafortune) over 4 years ago

  • vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97) Creates a regression in test_drb. Above my rubyfu. [#10828]

Revision 73645c1c
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

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

Revision 49505
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

Revision 49505
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

Revision 49505
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

Revision 49505
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

Revision 49505
Added by nobu (Nobuyoshi Nakada) over 4 years ago

vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]

Revision 738ce30f
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

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

Revision 49506
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

Revision 49506
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

Revision 49506
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

Revision 49506
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

Revision 49506
Added by nobu (Nobuyoshi Nakada) over 4 years ago

convert method name to a Symbol

  • vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828]

Revision a932a1b8
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

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

Revision 49507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

Revision 49507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

Revision 49507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

Revision 49507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

Revision 49507
Added by nobu (Nobuyoshi Nakada) over 4 years ago

test_inadvertent_creation.rb: assert method_missing

  • test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828]

Revision 43defa70
Added by naruse (Yui NARUSE) over 4 years ago

merge revision(s) 49499,49500,49501,49502,49504,49505,49506,49507: [Backport #10828]

    * vm_insnhelper.c: Fix one type of symbol leak with +send+
    * vm_insnhelper.c: Fix symbol leak with +send+ [Bug #10828]

    * vm_insnhelper.c (ci_missing_reason): return the reason of method
      missing in call info.

    * vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the
      proper missing reason.  [Bug #10828]

    * vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send):
      convert String method name into a Symbol, as method_missing
      method expects its first argument to be a Symbol.  [Bug #10828]

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

Revision 49598
Added by naruse (Yui NARUSE) over 4 years ago

merge revision(s) 49499,49500,49501,49502,49504,49505,49506,49507: [Backport #10828]

* vm_insnhelper.c: Fix one type of symbol leak with +send+
* vm_insnhelper.c: Fix symbol leak with +send+ [Bug #10828]

* vm_insnhelper.c (ci_missing_reason): return the reason of method
  missing in call info.

* vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the
  proper missing reason.  [Bug #10828]

* vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send):
  convert String method name into a Symbol, as method_missing
  method expects its first argument to be a Symbol.  [Bug #10828]

History

Updated by marcandre (Marc-Andre Lafortune) over 4 years ago

  • Assignee changed from marcandre (Marc-Andre Lafortune) to nobu (Nobuyoshi Nakada)
  • Priority changed from Normal to 5

Mmm, I was hopeful about r49500 but it generates some failures in test/drb/test_drb.rb, so there's something going on that's above my ruby-fu level.
I reverted that commit, disabling the two tests.
I'm assigning this to Nobu, in hope he can come to my rescue...

#2

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

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

Applied in changeset r49505.


vm_insnhelper.c: fix missing reason

  • vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info.
  • vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828]
#3

Updated by marcandre (Marc-Andre Lafortune) over 4 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED

Updated by naruse (Yui NARUSE) over 4 years ago

  • Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

ruby_2_2 r49598 merged revision(s) 49499,49500,49501,49502,49504,49505,49506,49507.

Also available in: Atom PDF