diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2022-12-19 11:21:16 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2022-12-19 13:13:26 -0500 |
| commit | 8275cad1e1646a2b301962313dc3e8ff1deb87b3 (patch) | |
| tree | a4ceda3cf6b87f5078c01841c3eea9ac4829f8ec /spec/ruby/core/basicobject/method_missing_spec.rb | |
| parent | b2f53dccbedd9f399bc4668eb02f26b2eafa6f5c (diff) | |
Fix buffer overrun when re-embedding objects
We eagerly set the new shape of an object when moving an object during
compaction. This new shape may have a different capacity than the
current original shape capacity. This means that we cannot copy from the
original buffer using size of the new capacity. Instead, we should use
the ivar count (which is less than or equal to both the new and original
capacities).
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6962
Diffstat (limited to 'spec/ruby/core/basicobject/method_missing_spec.rb')
0 files changed, 0 insertions, 0 deletions
