Skip to content

Revert ivar Java fields to fix remaining issues#7146

Merged
headius merged 2 commits intojruby:jruby-9.3from
headius:revert_ivar_fields
Mar 17, 2022
Merged

Revert ivar Java fields to fix remaining issues#7146
headius merged 2 commits intojruby:jruby-9.3from
headius:revert_ivar_fields

Conversation

@headius
Copy link
Member

@headius headius commented Mar 17, 2022

Temporarily reverting this PR and a follow-up commit due to problems with object_id handling (I think).

The ivar work by @byteit101 introduced an unexpected regression into the handling of frozen strings which I believe is due to breakage in how lazily-calculated object IDs are handled. The regression led to many failures in rubyspec and CRuby tests that depend on frozen string deduplication.

The issue seems to stem from our special treatment of object_id as not being a normal instance variable. Specifically, object_id is calculated lazily but atomically, so we do not consider it part of the instance variable table for a given class. The changes in #7012 seem to have broken this special treatment, causing object_id values to appear to be instance variables, which in turn leads our string deduplication logic to reject these objects and create new strings.

This was not caught before merging because for whatever reason CI was not running on #7012.

We will revisit the same commits in another PR and resolve this remaining issue before merging.

@headius headius added this to the JRuby 9.3.4.0 milestone Mar 17, 2022
@headius headius merged commit a0863e5 into jruby:jruby-9.3 Mar 17, 2022
@headius headius deleted the revert_ivar_fields branch March 17, 2022 12:56
byteit101 added a commit to byteit101/jruby that referenced this pull request Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant