[haiku-bugs] [Haiku] #8708: BShelf not always unloading replicant add-ons properly

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Tue, 10 Jul 2012 03:08:07 -0000

#8708: BShelf not always unloading replicant add-ons properly
------------------------------+------------------------------
 Reporter:  anevilyak         |        Owner:  axeld
     Type:  bug               |       Status:  new
 Priority:  normal            |    Milestone:  R1
Component:  Kits/Support Kit  |      Version:  R1/Development
 Keywords:                    |   Blocked By:
 Blocking:                    |  Has a Patch:  0
 Platform:  All               |
------------------------------+------------------------------
 BShelf internally maintains a map of replicant signatures to an image add-
 on id+ref count pair. This is used in order to know the correct image to
 unload when the replicant is removed. However, it relies on
 instantiate_object() returning the appropriate image ID. This, however,
 does not always happen, since the latter is only returning the image ID in
 the case where it must locate the add-on by signature and then load it
 itself, if it can find the instantiation function in one of the already
 loaded images, then the image ID is left as -1, which results in the
 replicant images not being unloaded properly.

 This behavior can be observed in Deskbar where add/removing a replicant,
 updating its on-disk add-on, and then trying to reload it results in the
 old replicant code still being used. Attached a patch which attempts to
 rectify the situation, review/comments welcome.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8708>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: