Project

General

Profile

Bug #14809

calc_lineno() returns wrong location

Added by ktsj (Kazuki Tsujimoto) 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-06-02 master 63545) [x86_64-linux]
[ruby-dev:50557]

Description

r62051のコミット以降

$ cat -n t.rb
     1  class String
     2    def -@
     3      p caller_locations(1, 1)[0]
     4    end
     5  end
     6
     7  -""
$ ruby-trunk t.rb
"t.rb:1:in `<main>'"
$ ruby-2.5 t.rb
"t.rb:7:in `<main>'"

のように、位置情報が正しく取れなくなるという問題が起きています。

インストラクションの種類によってPCが変更されるタイミングが異なるようになったことが原因です。


Related issues

Related to Ruby trunk - Bug #14834: rb_profile_frames SEGV when PC adjusted on IFUNCClosed

Associated revisions

Revision 6b534134
Added by shyouhei (Shyouhei Urabe) 4 months ago

give up insn attr handles_frame

I introduced this mechanism in r62051 to speed things up. Later it
was reported that the change causes problems. I searched for
workarounds but nothing seemed appropriate. I hereby officially
give it up. The idea to move ADD_PC around was a mistake.

Fixes [Bug #14809] and [Bug #14834].

Signed-off-by: Urabe, Shyouhei shyouhei@ruby-lang.org

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

Revision 63763
Added by shyouhei (Shyouhei Urabe) 4 months ago

give up insn attr handles_frame

I introduced this mechanism in r62051 to speed things up. Later it
was reported that the change causes problems. I searched for
workarounds but nothing seemed appropriate. I hereby officially
give it up. The idea to move ADD_PC around was a mistake.

Fixes [Bug #14809] and [Bug #14834].

Signed-off-by: Urabe, Shyouhei shyouhei@ruby-lang.org

History

#1 [ruby-dev:50561] Updated by shyouhei (Shyouhei Urabe) 5 months ago

I'll take care of it.

#2 Updated by shyouhei (Shyouhei Urabe) 4 months ago

  • Related to Bug #14834: rb_profile_frames SEGV when PC adjusted on IFUNC added

#3 Updated by shyouhei (Shyouhei Urabe) 4 months ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r63763.


give up insn attr handles_frame

I introduced this mechanism in r62051 to speed things up. Later it
was reported that the change causes problems. I searched for
workarounds but nothing seemed appropriate. I hereby officially
give it up. The idea to move ADD_PC around was a mistake.

Fixes [Bug #14809] and [Bug #14834].

Signed-off-by: Urabe, Shyouhei shyouhei@ruby-lang.org

Also available in: Atom PDF