14.07.2021 15:34, Dimitry Sibiryakov wrote:
   And here is a call stack from module destructor which in this case workd as 
UnloadDetector:

#1  0x00007ffff68f4921 in __GI_abort () at abort.c:79
#2  0x00007ffff0a5ff89 in PluginModule::~PluginModule (this=0x7ffff0f971b0 <module>, 
__in_chrg=<optimized out>)
     at /home/sd/ibptrace/plugin/main.cpp:248
#3  0x00007ffff68f7161 in __run_exit_handlers (status=0, listp=0x7ffff6c9f718 
<__exit_funcs>,
     run_list_atexit=run_list_atexit@entry=true, 
run_dtors=run_dtors@entry=true) at exit.c:108
#4  0x00007ffff68f725a in __GI_exit (status=<optimized out>) at exit.c:139
#5  0x00007ffff68d5bfe in __libc_start_main (main=0x5555555756e0 <main(int, 
char**)>, argc=2, argv=0x7fffffffe378,
     init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
stack_end=0x7fffffffe368) at ../csu/libc-start.c:344
#6  0x00005555555760fa in _start ()

   Obviously library's onexit handler that destruct global variables is called 
before application's one in glibc 2.27.

  And this is correct. What is not good for you is that it is called not 
because of module
unload (by Plugin Manager), AFAIU. I.e. you need something like 
UnloadDetectorHelper to corectly
unregister your plugin.

Regards,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to