From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2024-07-20T07:30:36+00:00 Subject: [ruby-core:118649] [Ruby master Bug#19781] Stack consistency error with tailcall and YJIT enabled Issue #19781 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: DONTNEED, 3.1: REQUIRED, 3.2: REQUIRED to 3.0: DONTNEED, 3.1: REQUIRED, 3.2: DONE ruby_3_2 commit:2ac8e2049bad37da38576b1ed263713c66eba2c9 merged revision(s) commit:e1104017e3080fd432c0b5fdc3ae6e004ffd0834. ---------------------------------------- Bug #19781: Stack consistency error with tailcall and YJIT enabled https://bugs.ruby-lang.org/issues/19781#change-109177 * Author: k0kubun (Takashi Kokubun) * Status: Closed * Assignee: yjit * Backport: 3.0: DONTNEED, 3.1: REQUIRED, 3.2: DONE ---------------------------------------- ```rb 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). -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/