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

Pidgin trac at pidgin.im
Mon Mar 23 04:04:35 EDT 2009


#8758: perl plugin does not get unloaded
-------------------------+--------------------------------------------------
     Reporter:  cavedon  |        Type:  defect 
       Status:  new      |   Component:  plugins
      Version:  2.5.5    |    Keywords:         
Launchpad_bug:           |  
-------------------------+--------------------------------------------------
 When purple_core_quit() is called the perl plugin is not unloaded.
 This happens because of the code (libpurple/plugins/perl/perl.c):
 {{{
         /* Mostly evil hack... puts perl.so's symbols in the global table
 but
          * does not create a circular dependency because g_module_open
 will
          * only open the library once. */
         /* Do we need to keep track of the returned GModule here so that
 we
          * can g_module_close it when this plugin gets unloaded?
          * At the moment I don't think this plugin can ever get unloaded
 but
          * in case that becomes possible this wants to get noted. */
         g_module_open("perl.so", 0);
 }}}

 Why is this line needed?

 The problem with the perl plugin not being unloaded is not just a memory
 concern: if purple_core_init() is called again, static variables inside
 the perl plugin are not reinitialized, and keep the old values (i.e.
 pointer to no longer valid memory locations).

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


More information about the Tracker mailing list