v1.1.5 - Fix CRITICAL segfault: Use wrapper nodes for no-kind-filter subscriptions
The kind index optimization in v1.1.4 introduced a critical bug that caused segmentation faults in production. The bug was in add_subscription_to_kind_index() which directly assigned sub->next for no-kind-filter subscriptions, corrupting the main active_subscriptions linked list. Root Cause: - subscription_t has only ONE 'next' pointer used by active_subscriptions list - Code tried to reuse 'next' for no_kind_filter_subs list - This overwrote the active_subscriptions linkage, breaking list traversal - Result: segfaults when iterating subscriptions Fix: - Added no_kind_filter_node_t wrapper structure (like kind_subscription_node_t) - Changed no_kind_filter_subs from subscription_t* to no_kind_filter_node_t* - Updated add/remove functions to use wrapper nodes - Updated broadcast function to iterate through wrapper nodes This follows the same pattern already used for kind_index entries and prevents any corruption of the subscription structure's next pointer.
This commit is contained in: