Project

General

Profile

Actions

Misc #18059

closed

Which FL_USERx are open to extension libraries?

Added by nobu (Nobuyoshi Nakada) 2 months ago. Updated 22 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:104758]

Description

Often the following failure occurs in test-spec.

RBasic support for regular objects supports copying the flags from one object over to the other FAILED
Expected 81920 == 33636352
to be truthy but was false
/tmp/ruby/v3/src/trunk/spec/ruby/optional/capi/shared/rbasic.rb:71:in `block (2 levels) in <top (required)>'
/tmp/ruby/v3/src/trunk/spec/ruby/optional/capi/rbasic_spec.rb:8:in `<top (required)>'

81920 == 0x14000
33636352 == 0x2014000
The difference 0x2000000 is FL_USER13, which is used as ROBJECT_TRANSIENT_FLAG.
This flag is set when any Object instance has some amount of instance variables.

In this particular case, it is possible to fix just by excluding the bit.
But, the question is which flags are open to extension libraries.

My guess is these flags are available for T_DATA classes, but not for T_OBJECT.
Any thoughts?

Actions

Also available in: Atom PDF