* topic/johanna/gh-744-cache-the-heck-out-of-these-certs:
X509 caching API change: callback gets entry directly
Address feedback
Small default updates & external baselines.
X509 caching: small API changes, tests & test updates
Certificate caching - now working in principle.
First (sadly not completely working) approach at caching X509 certificates
Added a comment to clarify comparison of EOF packet length to 13.
* origin/topic/vladg/gh-843:
Update baselines
Made additional MySQL fixes.
Add support to MySQL for deprecation of EOF packets.
Whitespace cleanup & fixes
Fix EOF detection in the MySQL protocol analyzer.
Only one instance of base_type() getting a NewRef instead of AdoptRef
fixed in merge. All other changes are superficial formatting and
factoring.
* 'leaks' of https://github.com/MaxKellermann/zeek: (22 commits)
Stmt: use class IntrusivePtr
Stmt: remove unused default constructors and `friend` declarations
Val: remove unimplemented prototype recover_val()
Val: cast_value_to_type() returns IntrusivePtr
Val: use IntrusivePtr in check_and_promote()
Val: use nullptr instead of 0
zeekygen: use class IntrusivePtr
ID: use class IntrusivePtr
Expr: use class IntrusivePtr
Var: copy Location to stack, to fix use-after-free crash bug
Scope: lookup_ID() and install_ID() return IntrusivePtr<ID>
Scope: delete duplicate locals
EventRegistry: automatically delete EventHandlers
main: destroy event_registry after iosource_mgr
zeekygen/IdentifierInfo: delete duplicate fields
main: free the global scope in terminate_bro()
Scope: pop_scope() returns IntrusivePtr<>
Scope: unref all inits in destructor
Var: pass IntrusivePtr to add_global(), add_local() etc.
plugin/ComponentManager: hold a reference to the EnumType
...
* origin/topic/timw/cleanup:
Expr: use fmt instead of sprintf
Expr: other minor initialization cleanup
Expr: use List::empty()
Expr: Convert a bunch of methods returning ints to return bools
IPAddr: minor cleanup
PriorityQueue: initialization cleanup
IP: Cleanup initialization, make a few functions consistent with others
- Minor cleanups in siphash24.h (code style, header include)
- Updated COPYING.3rdparty with new license info
* origin/topic/timw/faster-hashing:
Add a faster siphash24 implementation than the reference one
- Various minor code formatting/styling during the merge
* 'leaks' of https://github.com/MaxKellermann/zeek:
parse.y: fix memory leak in FieldAssignExpr call
parse.y: fix use-after-free bug in open-ended index_slice
Type: fix use-after-free bug in init_type()
Expr: fix memory leak in RecordCoerceExpr::Fold()
Expr: fix memory leak in RecordCoerceExpr::InitVal()
zeekygen/IdentifierInfo: fix memory leak in operator=()
Func: fix memory leaks in get_func_priority()
parse.y: fix several memory leaks after lookup_ID()
Func: fix memory leaks in check_built_in_call()
Var: fix memory leaks in add_global() and add_local()
Var: add missing references to `init` in add{,_and_assign}_local()
parse.y: hold reference on init_expr for zeekygen::Manager::Redef()
Expr: fix two memory leaks in AssignExpr::InitVal()
parse.y: fix memory leak after "&derepcated" without string
RuleMatcher: delete PatternSet instances in destructor (memleak)
option.bif: fix crash bug by referencing `Func`, not `Val`
- Minor whitespace tweak in merge
* 'ExpandAndInit_IntrusivePtr' of https://github.com/MaxKellermann/zeek:
Val: pass IntrusivePtr<> to TableVal::ExpandAndInit()
* origin/topic/jsiwek/32bit-compat:
Improve formatting of doubles that are close to integers
Improve HTTP version number comparisons
Add a 32-bit task to Cirrus CI config
Replace va_list fmt() overload with vfmt()
Format tables indexed by patterns consistently across 32-bit/64-bit
Format interval values consistently across 32-bit/64-bit platforms
Minor formatting/style changes in merge.
* 'refactor_obj' of https://github.com/MaxKellermann/zeek:
Val: use C++ initializers
Val: add BroValUnion constructors
Val: reduce duplicate code by using delegating constructors
Val: remove unused default constructors and `friend` declarations
Val: remove the unnecessary BroValUnion typedef
Type: remove unnecessary enum typedefs
Type: use C++ initializers
Type: move code from BroType::BroType() to constexpr functions
Type: remove useless BroType destructor
Obj: disallow copying BroObj
Obj: use C++ initializers
Obj: make `no_location` constexpr
Minor formatting change in merge so [[noreturn]] is consistently
on same line as function declarations.
* 'noreturn' of https://github.com/MaxKellermann/zeek:
threading/MsgThread: add [[noreturn]] to InternalError()
Flare: add [[noreturn]] to bad_pipe_op()
Obj: add [[noreturn]] attributes to Internal(), bad_ref()
Reporter: add [[noreturn]] attribute to several methods
Minor whitespace fixes during merge.
* 'smart_ptr' of https://github.com/MaxKellermann/zeek:
OpaqueVal: remove misplaced `virtual` keywords
CompHash: use class IntrusivePtr for the `type` field
IntrusivePtr: replace the "add_ref" parameter with tag structs
IntrusivePtr: remove reset(), nobody uses it
IntrusivePtr: remove ordering operators
IntrusivePtr: rename detach() to release()
IntrusivePtr: move nullptr initializer to field declaration
Updated the Ref() to happen inline with Assign() call for clarity.
* 'expr_missing_ref' of https://github.com/MaxKellermann/zeek:
Expr: add missing reference in AssignExpr::InitVal()
The merge commit fixes reference counting issues introduced with the
changes to ListExpr::Assign() and IndexExpr::Assign(), but then also
several other pre-existing reference counting confusions in other
Assign() implementations/calls, some which were now directly observable
via new crashing behavior, others just from a cursory code audit.
* 'memleaks' of https://github.com/MaxKellermann/zeek:
input/Manager: fix memory leak in UnrollRecordType()
OpaqueVal: fix two memory leaks in BloomFilterVal::Merge()
DbgBreakpoint: fix memory leak
DebugCmds: fix memory leak
scan.l: fix crash bug in do_atif()
Expr: fix memory leak in RecordConstructorExpr::InitVal()
Expr: fix memory leaks in AssignExpr::EvalIntoAggregate()
Expr: fix memory leaks in CondExpr::Eval()
Expr: fix several memory leaks in BoolExpr::Eval()
Expr: fix various memory leaks in Assign()
Expr: fix memory leaks in BinaryExpr::Eval()
analyzer/protocol/http: fix potential memory leak
* MaxKellermann/includes:
broker: include cleanup
file_analysis: include cleanup
file_analysis/Analyzer: eliminate duplicate constructor
probabilistic/Topk: include cleanup
digest: eliminate the "Reporter.h" include
Val: eliminate the "RE.h" include
Val: eliminate the "BroString.h" include
Val: eliminate the "CompHash.h" include
Val: forward-declare class PDict, reduce includes
Val: eliminate the "Scope.h" include
* origin/topic/timw/dict-unit-tests:
Reset the number of entries in a dict when calling Clear()
Code cleanup in Dict.h
Add unit testing for the public Dictionary API
* origin/topic/timw/clang-tidy:
fixup! Use string_view for a couple of Dbg methods
Add a couple of missing #includes that clang-tidy complains about (clang-diagnostic-error)
Fix missing namespace that was causing a build error
Remove unnecessary const from return value (readability-const-return-type)
Give real variable names to SegmentProfiler objects when defining them (bugprone-unused-raii)
Mark a few clang-tidy findings as false-positive
Use std::move in a few places instead of copying a pass-by-value argument (performance-unnecessary-value-param)
Use const-references in lots of places (preformance-unnecessary-value-param)
Use string_view for a couple of Dbg methods
Use const references over copying variables (performance-unnecessary-copy-initialization, performance-for-range-copy)
Use single-character version of string find() (performance-faster-string-find)
Move constructors/operators should be marked noexcept to avoid the compiler picking the copy constructor instead (performance-noexcept-move-constructor)
A race condition could cause unstable output: if the thread reading the
file is fast, often you see both "pred" functions execute and then both
"line" events execute with both entries already in the table, but if the
thread reading the file is slow, you see pred, event, pred, event, with
only one entry available in the first event.
The order in which &expire_func's get called isn't well-defined, so
separate the output from either to ensure diffs against the Baseline are
always consistent.