The commit
9f1e9ee0e ("DEBUG: stream: Display the currently running rule in
stream dump") revealed a bug. When a stream is dumped, if it is blocked on a
rule, we must take care the rule has a keyword to display its name.
Indeed, some action parsings are inlined with the rule parser. In that case,
there is no keyword attached to the rule.
Because of this bug, crashes can be experienced when a stream is
dumped. Now, when there is no keyword, "?" is display instead.
This patch must be backported as far as 2.6.
if (strm->current_rule_list && strm->current_rule) {
const struct act_rule *rule = strm->current_rule;
chunk_appendf(buf, "%s current_rule=\"%s\" [%s:%d] (%s)\n",
- pfx, rule->kw->kw, rule->conf.file, rule->conf.line,
+ pfx, rule->kw ? rule->kw->kw : "?", rule->conf.file, rule->conf.line,
(rule == strm->waiting_entity.ptr) ? "YIELDING" : "RUNNING");
}
}