Bug #1903

incorrect line returned (0) in rb_vm_get_sourceline()

Added by Mark Moseley over 5 years ago. Updated almost 4 years ago.

[ruby-core:24799]
Status:Rejected
Priority:Normal
Assignee:-
ruby -v:1.9.2 Backport:

Description

=begin
If rb_vm_get_sourceline() is called when cfp->pc is equal to cfp->iseq->iseq_encoded (IOW, on the first instruction), then zero will be returned as the line number.

I think that if:
iseq->insn_info_size > 0, and,
iseq->insn_info_table[0].position == 0,
then:
iseq->insn_info_table[0].line_no

should be returned.
=end

History

#1 Updated by Mark Moseley over 5 years ago

=begin
This is actually broader than I described. It occurs whenever:

iseq->insn_info_size > 0
and
iseq->insn_info_table[0].position = cfp->pc - cfp->iseq->iseq_encoded

=end

#2 Updated by Mark Moseley over 5 years ago

=begin
Never mind; I'm trying to fix another bug in the core and I'm calling rb_vm_get_sourceline() before the PC is incremented. Which cannot happen. Sorry for the noise.
=end

#3 Updated by _ wanabe about 5 years ago

  • Status changed from Open to Rejected

=begin

=end

Also available in: Atom PDF