From 9859dbc7fdaef2073fecd062c7294ab4dbb86b27 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 12 Oct 2023 15:06:45 +0900 Subject: [PATCH] Fix leaked symbols on FreeBSD [ci skip] --- tool/leaked-globals | 1 + vm_dump.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tool/leaked-globals b/tool/leaked-globals index 4f4a35cc30..367d35ab86 100755 --- a/tool/leaked-globals +++ b/tool/leaked-globals @@ -67,6 +67,7 @@ IO.foreach("|#{NM} #{ARGV.join(' ')}") do |line| next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "") next if n.include?(".") next if !so and n.start_with?("___asan_") + case n; when "_init", "_fini"; next end case n when /\A(?:Init_|InitVM_|pm_|[Oo]nig|dln_|coroutine_)/ next diff --git a/vm_dump.c b/vm_dump.c index d635af2c89..970c037edc 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -836,6 +836,9 @@ rb_print_backtrace(FILE *errout) } #ifdef HAVE_LIBPROCSTAT +struct procstat; +struct kinfo_proc; +static void procstat_vm(struct procstat *, struct kinfo_proc *, FILE *); #include "missing/procstat_vm.c" #endif