Closed brodeuralexis closed 1 year ago
After more work with the Falco SDK, I will close this issue as this is not a problem with the SDK, but Falco itself as I've had the same behaviour where plugin_init
was called twice, once for each plugin capability using Zig and plugin_types.h
and plugin_api.h
directly.
I've worked around the problem by reference counting a global plugin instance, which will work if we do not consider the fact that a plugin could be initialized with 2 different configuration values. In that case, a map of the hash of the config to reference counted plugins might work.
Describe the bug
Each mixin creates its own instance of the plugin, preventing the use of class member storage to share information.
How to reproduce it
Expected behaviour
I expect for both the
open: 0x[...]
andparse: 0x[...]
lines in the screenshot below to contain a pointer to the same instance.Screenshots
Environment
From binary releases directly from the Falco website. Configuration copied to /etc and binaries copied to /usr/local, everything with root owner and group.
Additional context