Skip to content

Do not make shared strings for extracted ranges#84

Merged
headius merged 1 commit intoruby:masterfrom
headius:no_shared_strings
Jan 20, 2024
Merged

Do not make shared strings for extracted ranges#84
headius merged 1 commit intoruby:masterfrom
headius:no_shared_strings

Conversation

@headius
Copy link
Contributor

@headius headius commented Jan 20, 2024

Fixes #83

@headius headius merged commit 83e6b46 into ruby:master Jan 20, 2024
@headius headius deleted the no_shared_strings branch January 20, 2024 22:21
headius added a commit to headius/jruby that referenced this pull request Jan 21, 2024
The issue arises when the `StringScanner` string is being modified
while being scanned. In such a case, that string's buffers will be
improperly shared, forcing a new buffer to be created each time it
is modified. Meanwhile the ever-growing buffers are held in memory
by the improperly shared return values.

This was fixed by ruby/strscan#84 and
strscan is updated in this PR.
headius added a commit to headius/jruby that referenced this pull request Jan 21, 2024
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.

java.lang.OutOfMemoryError error occurs when StringScanner keeps storing << and scan results in an array. (JRuby only, not CRuby)

1 participant