From: "alanwu (Alan Wu) via ruby-dev" <ruby-dev@ml.ruby-lang.org>
To: ruby-dev@ml.ruby-lang.org
Cc: "alanwu (Alan Wu)" <noreply@ruby-lang.org>
Subject: [ruby-dev:52119] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
Date: Tue, 29 Oct 2024 23:25:06 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-110290.20241029232505.1855@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20767.20240928070522.1855@ruby-lang.org>
Issue #20767 has been updated by alanwu (Alan Wu).
Status changed from Closed to Open
Reopening since the assert failed again on CI:
http://ci.rvm.jp/logfiles/brlog.trunk-repeat20-asserts.20241029-211036#L2454
----------------------------------------
Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
https://bugs.ruby-lang.org/issues/20767#change-110290
* Author: tagomoris (Satoshi Tagomori)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-09-27T17:45:22Z vm_assertion_cme_o.. 027ef60500) +PRISM [arm64-darwin23]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when:
* Kernel#require is refined
* Kernel#require is replaced by `alias_method` and `define_method`
* User code calls `require`
* The aliased method entry is undefined
Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`.
This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=11715
In this case, the cme had:
* def->type: CFUNC
* defined_class: Kernel
* owner: Kernel
I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here.
How should we fix this problem?
* Just delete the VM_ASSERT() (because the cme is just to be invalidated)
* Fix the root cause of the invalid&unexpected cme->owner
--
https://bugs.ruby-lang.org/
_______________________________________________
ruby-dev mailing list -- ruby-dev@ml.ruby-lang.org
To unsubscribe send an email to ruby-dev-leave@ml.ruby-lang.org
next prev parent reply other threads:[~2024-10-29 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 7:05 [ruby-dev:52116] " tagomoris (Satoshi Tagomori) via ruby-dev
2024-09-30 5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
2024-10-22 23:02 ` [ruby-dev:52118] " alanwu (Alan Wu) via ruby-dev
2024-10-29 23:25 ` alanwu (Alan Wu) via ruby-dev [this message]
2024-11-05 7:16 ` [ruby-dev:52121] " mame (Yusuke Endoh) via ruby-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-110290.20241029232505.1855@ruby-lang.org \
--to=ruby-dev@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).