Actions
Task #4682
openTask #2693: tracking: libsuricata
tracking: clean up globals and thread locals
Effort:
Difficulty:
Label:
Description
As we want to turn Suricata into libsuricata where there could be multiple instances of the suricata code in the consuming app, the suricata code can't rely on any globals or thread local vars.
While thread locals work in the context of the Suricata application, as a library, where users are bringing their own threads, it's possible that multiple, but distinct instances of the Suricata engine are run on the same thread. In this case, using thread locals can leak state from one instance into another. The thread pool is a good example here, as each instance may have its own pool settings and pre-allocated packet sizes.
Actions