Using an undefined function in a when statement causes a segfault
Running the following script crashes bro with a null-pointer exception:
(2) is fine from my point of view, flipping to merge request.
What's the expected behavior?
It doesn't look like something easily detected at parse-time, so ideas:
(1) fatal error message at run-time with a core dump should the code ever be executed (which may be infrequently if it's buried within complicated logic).
(2) nonfatal error message at run-time, but the when body can still be triggered as normal if the RHS is ever assigned a value.
topic/jsiwek/bit-1176 does (2). If that seems ok, please flip ticket to a merge request.
As Christian described in with another testcase, this does not only work with functions but with all kinds of variables.