Issue #7041 has been updated by stass (Stanislav Sedov).


Ruby does not destroy pthread condattr structure after allocating and using it in pthread_thread.c:native_cond_initialize().
This causes a memory leak that can be demonstrated by the following snipplet:

loop do
        Mutex.new
        GC.start
end

The patch attaches fixes this.
The bug happens on both 1.9 and head.
----------------------------------------
Bug #7041: Memory leak in Mutex
https://bugs.ruby-lang.org/issues/7041#change-29583

Author: stass (Stanislav Sedov)
Status: Open
Priority: Urgent
Assignee: 
Category: core
Target version: 
ruby -v: ruby 2.0.0dev (2012-09-20 trunk 36995) [x86_64-freebsd10.0]


=begin
Ruby does not destroy pthread condattr structure after allocating and using it in pthread_thread.c:native_cond_initialize().
This causes a memory leak that can be demonstrated by the following snipplet:

(({
loop do
        Mutex.new
        GC.start
end
}))

The patch attached fixes it.
This happens on both 1.9 and head.
=end


-- 
http://bugs.ruby-lang.org/