Issue #16136 has been updated by vcsjones (Kevin Jones).


Hello,

We started running in to this issue as well with Ruby 2.6.4. We are seeing =
consistent but non-deterministic string corruption in one of our applicatio=
ns. As an example, we see something like:

```
undefined method `"defense_profile_extension_id\x00eq"'
```

Note the `\x00` in the string does not belong there, it should be a `_`. Ho=
wever these results are not consistent. Another run of the application with=
 zero code changes produced this error:

```
undefined method `"\x00\x00\x00\x00\x00\x00\x00\x00f_profile_extension_id_e=
q"
```

Unfortunately, we have yet to be able to create a small reproduction of thi=
s issue. We can make it happen consistently in a very large code base thoug=
h. I did manage to run `git bisect` on a locally compiled ruby and determin=
ed that the change that introduced is https://github.com/ruby/ruby/commit/d=
a36d5700d9e0e66411d93595b6f654c85853fa1.

When we revert that change, the issue can no longer be reproduced.

----------------------------------------
Bug #16136: String corruption in 2.6.4
https://bugs.ruby-lang.org/issues/16136#change-81379

* Author: deivid (David Rodr=EDguez)
* Status: Open
* Priority: Normal
* Assignee: =

* Target version: =

* ruby -v: ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When trying to upgrade activeadmin's tests to use ruby 2.6.4, I got some ve=
ry weird failures where some strings would end up containing random content=
. See https://circleci.com/gh/activeadmin/activeadmin/20329 for an example =
of those failures. Failures are somewhat random but the test suite seems to=
 consistently fail on 2.6.4 and pass on 2.6.3. I also managed to reproduce =
the failures locally, sometimes very consistently, but now it's hardly ever=
 happening... :/

I looked at the changes in 2.6.4 and it looks like https://bugs.ruby-lang.o=
rg/issues/16105 and/or https://bugs.ruby-lang.org/issues/15946 could be rel=
ated, because the region of the Rails code where the corrupted string is cr=
eated seems to be doing something similar to the reported issues: https://g=
ithub.com/rails/rails/blob/b7e591a55f4de5f1511c3b9255b3b25159b8ba41/actionp=
ack/lib/action_dispatch/routing/mapper.rb#L404-L412.

Sorry I'm not really sure how to create a reproducible example, or how to d=
ebug this issue. Just opening this in case it could help noticing something=
 obviously wrong with the mentioned patches.



-- =

https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>