[haiku-bugs] Re: [Haiku] #6378: Block Cache Memory Leak

  • From: "jvff" <trac@xxxxxxxxxxxx>
  • Date: Sat, 24 Jul 2010 21:27:55 -0000

#6378: Block Cache Memory Leak
---------------------------+------------------------------------------------
  Reporter:  jvff          |         Owner:  nobody                  
      Type:  bug           |        Status:  new                     
  Priority:  normal        |     Milestone:  R1                      
 Component:  File Systems  |       Version:  R1/alpha2               
Resolution:                |      Keywords:  block cache, memory leak
Blocked By:                |   Has a Patch:  1                       
  Platform:  All           |      Blocking:                          
---------------------------+------------------------------------------------

Comment (by jvff):

 I ran block_cache.cpp through grep to find where stuff was assigned (ie.
 grep "<src>.* = ") and I reached the following dependancy:

 - original_data is either NULL, returned from Allocate or copied from
 parent_data (where the leak originally occurred);
 - parent_data is either NULL, returned from Allocate or copied from
 current_data;
 - current_data is returned from Allocate.

 This (initially) leads me to the conclusion that a "false overwrite"
 doesn't happen, which means the patch is (in theory) safe. However, it
 would be better if someone with more knowledge of the code could confirm
 this.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6378#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: