Actions
Bug #20910
closedleaked-globals not happy about dtrace related symbols
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [amd64-solaris2.11]
Description
I am not sure if this is Solaris specific, but when I build Ruby 3.3.6 with dtrace enabled and run its test suite, the leaked-globals checker fails with the following:
Checking leaked global symbols...48 un-prefixed symbols leaked
leaked
__dtraceenabled_ruby___array-create
__dtrace_ruby___array-create
__dtraceenabled_ruby___raise
__dtrace_ruby___raise
__dtraceenabled_ruby___gc-sweep-begin
....
I believe that these are not problematic and can be there.
The following simple change fixed the issue:
--- ruby-3.3.6/tool/leaked-globals
+++ ruby-3.3.6/tool/leaked-globals
@@ -73,6 +73,8 @@ IO.foreach("|#{NM} #{ARGV.join(' ')}") d
case n
when /\A(?:Init_|InitVM_|pm_|[Oo]nig|dln_|coroutine_)/
next
+ when /\A__dtrace/
+ next
when /\Aruby_static_id_/
next unless so
when /\A(?:RUBY_|ruby_|rb_)/
Actions
Like0
Like1Like0Like0