Project

General

Profile

Actions

Bug #19781

closed

Stack consistency error with tailcall and YJIT enabled

Added by k0kubun (Takashi Kokubun) over 1 year ago. Updated 4 months ago.

Status:
Closed
Assignee:
Target version:
-
[ruby-core:114258]

Description

src = <<-EOS
  def apply_one_and_two(&block)
    [1, p(1)]
  end
​
  def add_one_and_two
    apply_one_and_two(&:+)
  end
EOS

RubyVM::InstructionSequence.new(
  "proc {|_|_.class_eval {#{src}}}",
  __FILE__, __FILE__, 1,
  tailcall_optimization: true,
  trace_instruction: false,
).eval[self.singleton_class]

def entry
  add_one_and_two
end

entry

This script causes "Stack consistency error" with ruby --yjit-call-threshold=1 on any YJIT-enabled build (3.1, 3.2, and master).


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #19780: Remove tailcall_optimization supportOpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0