[#108552] [Ruby master Bug#18782] Race conditions in autoload when loading the same feature with multiple threads. — "ioquatix (Samuel Williams)" <noreply@...>
Issue #18782 has been reported by ioquatix (Samuel Williams).
11 messages
2022/05/14
[ruby-core:108667] [Ruby master Bug#18779] `GC.compact` and other compaction related methods should be defined as rb_f_notimplement on non supported platforms.
From:
"byroot (Jean Boussier)" <noreply@...>
Date:
2022-05-24 17:05:23 UTC
List:
ruby-core #108667
Issue #18779 has been updated by byroot (Jean Boussier). Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.7: WONTFIX, 3.0: REQUIRED, 3.1: REQUIRED Status changed from Open to Closed The PR was merged so we can now close this. I'm marking 3.0 and 3.1 for backport. The two commits are: - `6ddec1082d06431111123c03b18ca41e7a2cec12` - `e9623f7432b4603735c74b6f0bb683a9bf19c2c6` ---------------------------------------- Bug #18779: `GC.compact` and other compaction related methods should be defined as rb_f_notimplement on non supported platforms. https://bugs.ruby-lang.org/issues/18779#change-97709 * Author: byroot (Jean Boussier) * Status: Closed * Priority: Normal * Backport: 2.7: WONTFIX, 3.0: REQUIRED, 3.1: REQUIRED ---------------------------------------- I received several bug report on native gems using `GC.verify_compaction_references` in their test suite. Examples: - https://github.com/msgpack/msgpack-ruby/pull/275/files - https://github.com/Shopify/bootsnap/pull/414/files I think that when `!GC_COMPACTION_SUPPORTED`, rather than raise `NotImplementedError`, we should instead define these methods as `rb_f_notimplement` like `Process.fork` on Windows. This way `GC.respond_to?(:compact)` would be a proper way to test for compaction support. Unfortunately, these methods are defined through `.rb` files with `Primitive`, and I don't know wether it's possible to check `GC_COMPACTION_SUPPORTED` from there, nor if it's possible to define a `rb_f_notimplement` method. cc @tenderlovemaking -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>