From: "tagomoris (Satoshi Tagomori) via ruby-dev" <ruby-dev@ml.ruby-lang.org>
To: ruby-dev@ml.ruby-lang.org
Cc: "tagomoris (Satoshi Tagomori)" <noreply@ruby-lang.org>
Subject: [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
Date: Sat, 28 Sep 2024 07:05:23 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-20767.20240928070522.1855@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20767.20240928070522.1855@ruby-lang.org>
Issue #20767 has been reported by tagomoris (Satoshi Tagomori).
----------------------------------------
Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
https://bugs.ruby-lang.org/issues/20767
* Author: tagomoris (Satoshi Tagomori)
* Status: Open
* 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 parent reply other threads:[~2024-09-28 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 7:05 tagomoris (Satoshi Tagomori) via ruby-dev [this message]
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 ` [ruby-dev:52119] " alanwu (Alan Wu) via ruby-dev
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.issue-20767.20240928070522.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).