diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-01-15 14:14:43 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-01-15 15:23:16 -0800 |
commit | 0ed71b37fa9af134fdd5a7fd1cebd171eba83541 (patch) | |
tree | 8cd50dff319d2e6b3cd903190b559d4dc8a80c37 /mjit_worker.c | |
parent | e7f1afbccd3bd7026b7e4f2301beb149ea14a78c (diff) | |
download | ruby-0ed71b37fa9af134fdd5a7fd1cebd171eba83541.tar.gz |
Don't try to clear cache on garbage objects
Method cache can be cleared during lazy sweeping. An object that will
be collected during lazy sweep *should not* have it's method cache
cleared. Soon-to-be-collected objects can be in an inconsistent state and
this can lead to a crash. This patch just leaves early if the object is
going to be collected.
Fixes [Bug #17536]
Co-Authored-By: John Hawthorn <john@hawthorn.email>
Co-Authored-By: Alan Wu <XrXr@users.noreply.github.com>
Diffstat (limited to 'mjit_worker.c')
0 files changed, 0 insertions, 0 deletions