* origin/topic/christian/fix-config-segfault:
Btest tweak for improved type rendering in config framework errors and set types
More precise type information in a config framework error message
Explicitly don't support sets with multiple index types in input/config frameworks
* origin/topic/vern/script-xform: (30 commits)
Adjust some Reducer ref-counting and IntrusivePtr usage
Fix reference counting in ListExpr inline/reduce methods
Simplify WhileStmt::CondPredStmt()
Use std::move() in Case::UpdateBody()
Switch some Stmt transform/reduce logic to use IntrusivePtr
Switch some Expr transform/reduce logic to use IntrusivePtr
Adjust how some Expr::SetOpX() calls use std::move()
Add missing header-includes to Reduce.h
Add std::move() for args to an assign_to_index call
Adjust memory management for &default argument expression type-check
Use string for TempVar::name
Switch AnalyOpt::only_func to optional<string>
Fix a signed/unsigned comparison warning
simplified some vestigial complexity I noticed when flipping through diffs
canonicalization for an error message in one of the alternative test baselines
baseline differences for "xform" alternative: changes generally reflect exposure of transformed code, or error propagation stopping earlier due to error now occurring in an assignment (to a temporary)
new testing alternative for script transformation (= xform)
bug in correctly inspecting test output file
split bifs.string_utils into a non-error test and an only-errors test, to help control for differing error propagation
logic for driving the script optimization process
...
* origin/topic/vern/bvu-remove:
Use static_cast instead of dynamic_cast for Val conversions
Remove GET_FIELD_AS macro, replace with template methods
Add templated As() method to Val, use in various places we were using dynamic_cast
Move ValImpl classes into detail namespace
Some review cleanup in Val.cc
Changes addressing pending issues per PR discussion
Remove BroValUnion by hoisting underlying Val subclass values into subclasses
* origin/topic/vern/lambda-copy-semantics:
Add NEWS entries for lambda/capture-list functionality
Tweak vector append/move logic of Frame::SerializeCopyFrame()
Switch FuncType capture-list storage to optional<vector<Capture>>
Fix memory leaks in lambda capture/frame management
tests added for new capture-by-reference closure semantics & errors
documentation updates
test suite updates and additions for new capture semantics & suppression of error cascades
support for transmitting of capture-semantics closures via Broker, while keeping deprecated functionality
minor simplifications in using type names, and unordered sets rather than vectors
changes to Frames to support access to captured-by-copy-semantics variables
changes to ScriptFunc's to track captures, and LambdaExpr's to check/manage them
parsing of new []-style captures, and creation of associated data structures
nit: fixed some 0/1 values that should instead be false/true
no semantic changes: factored some of the complexity of begin_func() into a pair of static functions for clarity
simple error propagation fix: don't complain about "unused" values that themselves are due to errors
no semantic changes: corrected & reflowed some comments, plus a whitespace tweak
When an option's value is a reader-incompatible table or set, Zeek now
renders the type as expressed in the script layer (e.g. "set[addr,addr]")
as opposed to the internal type tag (which'd here be "table", including
for sets).
The input framework's Manager::IsCompatibleType() already rejected
sets with multiple index types that aren't all the same (i.e. that are
not pure). Pure ones (e.g. "set[addr,addr]") slipped through and could
cause Zeek to segfault elsewhere in the config framework due to type
comparison subtleties. Note that the ASCII reader can't read such sets
anyway, so this method now rejects sets with any kind of index-type
tuple.
In the config framework, the script-level change handler has a risky
conversion from any to set[bool], which can trigger segfaults when the
underlying set's index is a type tuple. We now prevent this code path
by ensuring it only applies to sets with a single index type.