diff options
| author | nagachika <nagachika@ruby-lang.org> | 2025-03-16 18:02:45 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2025-03-16 18:02:45 +0900 |
| commit | 726bff43b462d2a1b0bc93299cf031202f7fe7a1 (patch) | |
| tree | 4129864c80b5244de673fed849b31573ae345f49 /include/ruby | |
| parent | 1d3c19871d7a0d05a0f0a80e78cfad843b7ef324 (diff) | |
merge revision(s) c224ca4feaff20cab03d76439bcbfb35d4e2f6b1: [Backport #21172]
Fix a race condition with interned strings sweeping.
[Bug #21172]
This fixes a rare CI failure.
The timeline of the race condition is:
- A `"foo" oid=1` string is interned.
- `"foo" oid=1` is no longer referenced and will be swept in the future.
- Another `"foo" oid=2` string is interned.
- `register_fstring` finds `"foo" oid=1`, but since it is about to be swept,
removes it from `fstring_table` and insert `"foo" oid=2` instead.
- `"foo" oid=1` is swept, since it has the `RSTRING_FSTR` flag,
a `st_delete` is issued in `fstring_table` which removes `"foo" oid=2`.
I don't know how to reproduce this bug consistently in a single test
case.
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
