From: "mame (Yusuke Endoh) via ruby-core" Date: 2024-02-17T12:17:48+00:00 Subject: [ruby-core:116825] [Ruby master Feature#20274] Add RubyVM::ASAN.enabled? Issue #20274 has been updated by mame (Yusuke Endoh). You just need the API for the Ruby test suite, right? Then, it would be enough to implement it in ext/-test-/. Introducing a method under RubyVM means making it available to Ruby users. Is that necessary? Note, I don't think that it is a good idea to change the test behavior only when ASAN is enabled. I understand #20273 since callcc is very special, though. ---------------------------------------- Feature #20274: Add RubyVM::ASAN.enabled? https://bugs.ruby-lang.org/issues/20274#change-106851 * Author: kjtsanaktsidis (KJ Tsanaktsidis) * Status: Open * Priority: Normal ---------------------------------------- Some parts of the Ruby test suite won't work correctly under ASAN. In particular, `assert_no_memory_leak` will need different parameters for ASAN (or be skipped, in the same way as for MJIT/RJIT). I propose that we add a module `RubyVM::ASAN` (which will be unconditionally defined), and `RubyVM::ASAN.enabled?` (which will return true if Ruby was compiled with ASAN, or false otherwise). This means we can check if ASAN is enabled by running `defined?(RubyVM::ASAN) && RubyVM::ASAN.enabled?`, in the same way that the mjit/rjit check is performed. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/