Project

General

Profile

Actions

Bug #19781

closed

Stack consistency error with tailcall and YJIT enabled

Added by k0kubun (Takashi Kokubun) 10 months ago. Updated 9 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 #1

Updated by k0kubun (Takashi Kokubun) 10 months ago

  • Related to Feature #19780: Remove tailcall_optimization support added
Actions #2

Updated by k0kubun (Takashi Kokubun) 9 months ago

  • Status changed from Open to Closed

Applied in changeset git|e1104017e3080fd432c0b5fdc3ae6e004ffd0834.


YJIT: Fix cfp inconsistency on tailcall (#8107)

[Bug #19781]

Actions

Also available in: Atom PDF

Like0
Like0Like0