The global filtercheck list g_filterlist is used in sysdig to also accumulate filterchecks implemented by plugins. However, since that variable is static, it also means that plugins will be kept alive in their shared pointer even after the inspector they've been registered into gets destroyed, and will be instead destroyed at program termination. Even though we don't have sophisticated destroy logic for sinsp-implemented filterchecks, this could be generally wrong for plugins in their teardown phase.
The global filtercheck list
g_filterlist
is used in sysdig to also accumulate filterchecks implemented by plugins. However, since that variable is static, it also means that plugins will be kept alive in their shared pointer even after the inspector they've been registered into gets destroyed, and will be instead destroyed at program termination. Even though we don't have sophisticated destroy logic for sinsp-implemented filterchecks, this could be generally wrong for plugins in their teardown phase.