aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-07 12:59:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-08 11:31:17 +0900
commit28ae4e46284428ccee509aaad8bf5c0d01571741 (patch)
tree529657ea73e46f448e407508cde364511f0b0350 /tool
parent7f2bd17fad806ab6b8e7be5e8fc138429f445f0e (diff)
downloadruby-28ae4e46284428ccee509aaad8bf5c0d01571741.tar.gz
leaked-globals: ignore Address Sanitizer symbols
Diffstat (limited to 'tool')
-rwxr-xr-xtool/leaked-globals2
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/leaked-globals b/tool/leaked-globals
index be2e377118..56c07204f3 100755
--- a/tool/leaked-globals
+++ b/tool/leaked-globals
@@ -44,6 +44,7 @@ ARGV.reject! do |n|
true
end
end
+
# darwin's ld64 seems to require exception handling personality functions to be
# extern, so we allow the Rust one.
REPLACE.push("rust_eh_personality") if RUBY_PLATFORM.include?("darwin")
@@ -55,6 +56,7 @@ IO.foreach("|#{NM} #{ARGV.join(' ')}") do |line|
next unless /[A-TV-Z]/ =~ t
next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "")
next if n.include?(".")
+ next if n.start_with?("___asan_")
next if /\A(?:Init_|InitVM_|RUBY_|ruby_|rb_|yp_|[Oo]nig|dln_|coroutine_)/ =~ n
next if REPLACE.include?(n)
puts col.fail("leaked") if count.zero?