[Pidgin] #8758: perl plugin does not get unloaded

Pidgin trac at pidgin.im
Mon Mar 23 13:52:09 EDT 2009


#8758: perl plugin does not get unloaded
---------------------+------------------------------------------------------
 Reporter:  cavedon  |           Owner:  deryni 
     Type:  defect   |          Status:  new    
Milestone:           |       Component:  plugins
  Version:  2.5.5    |      Resolution:         
 Keywords:           |   Launchpad_bug:         
---------------------+------------------------------------------------------

Comment(by cavedon):

 I see your point that the static pointers should be valid.
 However, when the purple_core_init() is called the second time,
 init_plugin() of the perl plugin is called again, and I noticed that, at
 that time, loader_info.exts contains an invalid address the use of which
 is causing memory corruption.

 Looks like that purple_plugin_destroy() in plugin.c is destroying the list
 in loader_info.exts. That is the reason why the pointer is not valid.

 A fix would be to always create a new list in perl's init_plugin(), as
 long as we are sure it is not possible for it to be called twice without
 calling purple_plugin_destroy() in between. Are we?

 >A patch which tracked the returned handle and unloaded it when the perl
 plugin is unloaded would be accepted.

 I am not sure how you would do that: just call g_module_close() on return
 value of g_module_open() at module unload?

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8758#comment:3>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list