From 704677257ecb01c7ee10aa0dfc55ca1d4fc4636d Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Sun, 5 Oct 2025 11:15:09 -0400 Subject: [PATCH] Also add LSAN_OPTIONS=handle_segv=0 in assert_segv Just like ASAN, when running with LSAN, we also want to set handle_segv=0 in assert_segv to make sure that the tests pass. --- test/ruby/test_rubyoptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 2b7cf1c8999a4c..4ee6633c2b6560 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -858,7 +858,7 @@ def assert_segv(args, message=nil, list: SEGVTest::ExpectedStderrList, **opt, &b env['RUBY_CRASH_REPORT'] ||= nil # default to not passing down parent setting # ASAN registers a segv handler which prints out "AddressSanitizer: DEADLYSIGNAL" when # catching sigsegv; we don't expect that output, so suppress it. - env.update({'ASAN_OPTIONS' => 'handle_segv=0'}) + env.update({'ASAN_OPTIONS' => 'handle_segv=0', 'LSAN_OPTIONS' => 'handle_segv=0'}) args.unshift(env) test_stdin = ""