[ruby-core:120012] [Ruby master Bug#20910] leaked-globals not happy about dtrace related symbols
From:
"Kulikjak (Jakub Kulik) via ruby-core" <ruby-core@...>
Date:
2024-11-26 12:27:17 UTC
List:
ruby-core #120012
Issue #20910 has been reported by Kulikjak (Jakub Kulik).
----------------------------------------
Bug #20910: leaked-globals not happy about dtrace related symbols
https://bugs.ruby-lang.org/issues/20910
* Author: Kulikjak (Jakub Kulik)
* Status: Open
* ruby -v: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [amd64-solaris2.11]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
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:
```diff
--- 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_)/
```
--
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/lists/ruby-core.ml.ruby-lang.org/