-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying a StringIO can overwrite other strings derived from it #5203
Comments
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
May 31, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
Jun 1, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
Jun 1, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
Jun 4, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
Jun 5, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
Jun 5, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
kares
added a commit
that referenced
this issue
Jun 12, 2018
... later modification to StringIO#string might affect the line resolves GH-5203
This bug breaks the S3 AWS SDK gem when using the multipart upload API to an invalid region aws/aws-sdk-ruby#1843. I have verified that b087544 fixes the issue by:
Looking forward to this being in |
aryeh-looker
pushed a commit
to aryeh-looker/jruby
that referenced
this issue
Jul 29, 2018
enebo
added a commit
that referenced
this issue
Sep 19, 2018
…gh-5203 Add Complimentary Regression Test for GH-5203
ccaviness
pushed a commit
to ccaviness/puppet
that referenced
this issue
Sep 19, 2018
By using a literal string with no interpolation in the construction of a stringio instance we avoid a subtle string sharing bug that was causing corruption. jruby/jruby#5203
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
I am testing some file rewriting by using a StringIO instance. The original contents get parsed, resulting in various other strings, and then the StringIO is rewritten. I've found that the rewriting will modify the other strings from parsing.
I've managed to reproduce it with this standalone script:
Since
a
is an array of the original lines fromeach_line
this script should print the original string argument toStringIO.new
, but instead it includes the outputxxxxxxxx
overwriting part of the first line.I've poked around a bit, and it seems like in this case StringIO.getline creates a substring such that the new string is shared but the original doesn't get marked as shared.
The text was updated successfully, but these errors were encountered: