Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gc/default/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -9663,7 +9663,7 @@ gc_profile_disable(VALUE _)
return Qnil;
}

void
static void
rb_gc_verify_internal_consistency(void)
{
gc_verify_internal_consistency(rb_gc_get_objspace());
Expand Down
2 changes: 1 addition & 1 deletion test/ruby/test_settracefunc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def test_break # [ruby-core:27606] [Bug #2610]
2: events << [event, lineno, mid, klass] if file == name
3: })
4: [1,2,3].any? {|n| n}
8: set_trace_func(nil)
5: set_trace_func(nil)
EOF

[["c-return", 1, :set_trace_func, Kernel],
Expand Down
14 changes: 10 additions & 4 deletions tool/lib/leakchecker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,24 @@ def check_fd_leak(test_name)
end
if header = open_list&.shift
columns = header.split
fd_index, node_index = columns.index('FD'), columns.index('NODE')
fd_index, type_index, node_index = %w'FD TYPE NODE'.map {|n| columns.index(n)}
open_list.reject! do |of|
of = of.chomp.split(' ', node_index + 2)
if of[node_index] == 'TCP' and of.last.end_with?('(CLOSE_WAIT)', '(CLOSED)')
# Sometimes TCP sockets still live in the kernel space
# but have been closed in the user space.
skip = true
elsif of[type_index] == 'systm'
# AF_SYSTEM on macOS is kept alive
skip = true
end
if skip
fd = of[fd_index].to_i
inspect.delete(fd)
h.delete(fd)
live2.delete(fd)
true
else
false
end
skip
end
puts(header, open_list) unless open_list.empty?
end
Expand Down