These assertions were checking for a situation that I believe can
happen legitimately: a robust iterator pointing to an index that,
after some table resizing, happens to be inside the overflow area and
hence empty. We'll now move it to the end of the table in the case.
When inserting/deleting elements, we now remove their `DictEntries`
from any robust iterators' bookkeeping. First, we don't need that
information anymore, and second the `DictEntries` contain pointers
that may become invalid.
I don't know how to write a unit test for this unfortunately because
it depends on where exactly things land in the hash table.
Btw, memory mgmt for DictEntries is pretty fragile: They contain
pointers to both memory they own (`key`) and memory they don't own
(`value`). The former type of pointers is shallow-copied on
assignment/copy-construction, meaning that there can be multiple
instances seemingly owning the same memory. That only works because
deletion is manual, and not part of standard destruction. The second
type of pointer has a similar problem, except that it's managed
externally. It's important to not end up with multiple `DictEntries`
pointing to the same value (which is actually what that iterator
bookkeeping did).
Addresses #2032.
#1835 subtly changed the semantics of the `LoadFile` plugin hook to no
longer have the current script location available for signature files
being loaded through `@load-sigs`. This was undocumented behavior, so
it's technically not a regression, but since at least one external
plugin is depending on it, this change restores the old behavior.
We could already pass an overriding tag to
`Analyzer::AnalyzerConfirmation()`, but we didn't have that ability
for `AnalyzerViolation`, leading to the two potentially mismatching in
the analyzer they report.
PktSrc::GetNextTimeout always returned a fixed timeout of 20 microseconds for non-selectable packet sources regardless of whether they have packets available. This adds unnecessary delay every FindReadySources poll_interval when packets are available to be read.
Instead, for non-selectable packet sources, check whether packets are available and return a timeout of 0 to indicate data is available. This is closer to the behaviour of the old capture loop.
This was mitigated somewhat by the fact FindReadySources poll interval defaults to 100 packets, and live sources are added to the ready list regardless of whether they have packets available (unless it is time to force a poll).
* origin/topic/vern/table-attr-fixes:
updates for btests - new cases to check, new baselines
updates for btests - new cases to check, new baselines
fix for ill-formed (complex) &default function
type-checking for use of empty table constructors in expressions
catch empty constructors used for type inference suppress repeated error messages
factoring to make checking of &default attributes externally accessible
bug fix for empty table constructors with &default attributes (plus a typo)
* topic/christian/gh-1963:
Add cmake-time reporting of bifcl, binpac, and gen-zam used for build
Build Gen-ZAM from a submodule and support use of pre-existing executable
* origin/topic/vern/event-trace:
low-level style tweaks
--event-trace / -E option to generate event trace
hooks to support event tracing
classes providing event-tracing/dumping functionality
provide access to Val internals for event tracing purposes
set_network_time() BiF in support of event replaying
low-level naming tweaks / comments / const-ified accessor
* origin/topic/vern/init-integration:
updates for compile-to-C++
updates for ZAM optimization
btest tweaks I overlooked
updates for script optimization
new btests to cover extended functionality & associatd errors
updates to btests to support switch to expression-based initialization
tweaks to base scripts revealed by switch to expression-based initialization
switch variable initialization over to being expression-based
simplification of Val classes now that they don't have to support initialization
factoring and re-working of type merging
use new interface for associating attributes with constructors
rework type inference due to switch from separate initializers to expressions
avoid evaluating calls to determine whether an expression value is ignored
reworking of expressions to unify =/+=/-= with initialization
allow {} expression lists for =/+=/-= RHS
tweak for comparing redundant-but-complex attributes