ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
@ 2024-09-28  7:05 tagomoris (Satoshi Tagomori) via ruby-dev
  2024-09-30  5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tagomoris (Satoshi Tagomori) via ruby-dev @ 2024-09-28  7:05 UTC (permalink / raw)
  To: ruby-dev; +Cc: tagomoris (Satoshi Tagomori)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-05  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-28  7:05 [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation 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 ` [ruby-dev:52119] " alanwu (Alan Wu) via ruby-dev
2024-11-05  7:16 ` [ruby-dev:52121] " mame (Yusuke Endoh) via ruby-dev

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).