path: root/tool/leaked-globals
diff options
authorYusuke Endoh <>2019-09-22 22:12:18 +0900
committerGitHub <>2019-09-22 22:12:18 +0900
commit5f35b8ca30cba69968d4d0c885a4bf5c48b03e17 (patch)
treec8388a0b0dc8790b906ebc5bc90660eccaf4f980 /tool/leaked-globals
parent2272efa4632a845ead37377a22ad9e24b45ebf27 (diff)
st.c: Use rb_st_* prefix instead of st_* (#2479)
The original st.c was public domain hash table implementation, but Ruby's st.c is highly modified, and its data structure is not compatiblie with the original one. Therefore, when creating an extension library to wrap C code that uses the original st.c, the symbols conflict, which leads to segfault. This changes the prefix `st_*` of st.c functions to `rb_st_*` for reflecting that they are specific to Ruby's, and avoid symbol conflicts.
Notes: Merged-By: mame <>
Diffstat (limited to 'tool/leaked-globals')
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/leaked-globals b/tool/leaked-globals
index de17038704..ec116211de 100755
--- a/tool/leaked-globals
+++ b/tool/leaked-globals
@@ -24,7 +24,7 @@ IO.foreach("|#{NM} -Pgp #{ARGV.join(' ')}") do |line|
next unless /[BDT]/ =~ t
next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "")
next if n.include?(".")
- next if /\A(?:Init_|InitVM_|ruby_|rb_|[Oo]nig|st_|dln_|mjit_|coroutine_|nu(?:comp|rat)_)/ =~ n
+ next if /\A(?:Init_|InitVM_|ruby_|rb_|[Oo]nig|dln_|mjit_|coroutine_|nu(?:comp|rat)_)/ =~ n
next if REPLACE.include?(n)
puts"leaked") if
count += 1