madf: (Default)
madf ([personal profile] madf) wrote2009-03-23 07:50 pm

Ну я так просто здатися не міг

Треба ж було ще встановити, чого воно не падало на Linux :)

Спочатку звернемо увагу на те, з якого модуля виклик (mod_auth_ia.so)
(gdb) 
0xb749b300 in BASE_PLUGIN::~BASE_PLUGIN () from ./modules/mod_auth_ia.so

А тепер - звідки він прийшов (mod_auth_ao.so)
(gdb) bt
#0  ~BASE_PLUGIN (this=0x80e97c8)
    at /home/faust/Projects/STG/stg-2.5/projects/stargazer/../../include/base_plugin.h:48
#1  0xb74a7ba9 in ~BASE_AUTH (this=0x80e97c8)
    at /home/faust/Projects/STG/stg-2.5/projects/stargazer/../../include/base_auth.h:41
#2  0xb7485fdf in ~AUTH_AO (this=0x80e97c8) at ao.h:82
#3  0xb74808f1 in ~AO_CREATOR (this=0xb748df84) at ao.cpp:46
#4  0xb747f500 in __tcf_2 () at ao.cpp:57
#5  0xb7e5953f in __cxa_finalize () from /lib/libc.so.6
#6  0xb747f3d3 in __do_global_dtors_aux () from ./modules/mod_auth_ao.so
#7  0xb7489cfc in _fini () from ./modules/mod_auth_ao.so
#8  0xb7fd74ef in _dl_close () from /lib/ld-linux.so.2
#9  0xb7f62ed4 in ?? () from /lib/libdl.so.2
#10 0x080e9458 in ?? ()
#11 0xb7fdffbc in ?? () from /lib/ld-linux.so.2
#12 0xbfcdba68 in ?? ()
#13 0xb7fd2832 in _dl_catch_error () from /lib/ld-linux.so.2

А тепер, для тих хто не помітив - лог:
          main.cpp > 19:53:02 > Unloading module './modules/mod_auth_ia.so'
          main.cpp > 19:53:02 > Unloading module './modules/mod_auth_ao.so'
          main.cpp > 19:53:02 > Unloading module './modules/mod_conf_sg.so'
          main.cpp > 19:53:02 > Unloading module './modules/mod_conf_rpc.so'
          main.cpp > 19:53:02 > Unloading module './modules/mod_cap_ipq.so'
    inetaccess.cpp > 19:53:02 > Destructing inetaccess

Деструктор першого плагіна виконався останнім. Бібліотека залишалась у пам'яті до тих пір, поки використовувались її символи - із BASE_AUTH і BASE_PLUGIN.