Skip to content

Fix test_gets_separator_modified_by_io with mmtk - #201

Merged
hsbt merged 1 commit into
masterfrom
claude/elastic-hamilton-f492d1
Nov 26, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/elastic-hamilton-f492d1

Conversation

@hsbt

@hsbt hsbt commented Nov 26, 2026

Copy link
Copy Markdown
Member

test_gets_separator_modified_by_io fails every time in the ModGC workflow of ruby/ruby with mmtk, on both Linux and macOS. mmtk can embed a String of any length in its object, so "-" * 1000 keeps its content there, and rs.clear << ... or rs.replace(...) from #200 writes the new content into the same place. The pointer never changes, so rscheck has nothing to detect. The default GC is not affected.

This grows rs from an empty string so that its content lives in a separate buffer with any GC. I checked it on a local mmtk build of ruby/ruby, the default GC, and mswin. The test passes everywhere and still fails when rscheck is reverted to &&. The same change is tested in ruby/ruby#20201.

Generated with Claude Code

mmtk can embed a String of any length in its object, so `"-" * 1000` keeps its content there and `replace` copies the new content into the same place. The pointer never changes and the test always fails with mmtk. Grow `rs` from an empty string so that its content lives in a separate buffer with any GC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit 40e85f2 into master Nov 26, 2026
62 checks passed
@hsbt
hsbt deleted the claude/elastic-hamilton-f492d1 branch November 26, 2026 10:19
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