- Added explicit test case of "unused assignement" warning and
&is_used suppression during merge.
* origin/topic/vern/use-defs:
activate &is_used
removed unnecessary statement flagged by Coverity (thanks, Jon!)
Adjust reference/move nitpicks in use-def/reduce code
Adjust some whitespace in UseDefs.cc
updates to "usage" test suite alternative now that more warnings are generated
suppress usage warning in baseline script
"xform" alternative baseline update, needed for recent change to master
baseline update due to shift in number of lines in base intel framework script
environment variable (which has precedence) not flags for baseline usage test
splitting out "usage" test suite alternative into -u/-uu versions
adding &is_used attribute for base scripts - not actually needed yet, but will be once optimization is added
removing unused assignments from base scripts
driver glue for invoking use-def construction
classes for managing and propagating use-defs
enhancements/changes to the Reduce class in preparation for use-defs
some tidying with smart pointers
flag/environment variable for dumping use-defs
&is_used attribute to suppress set-but-not-used usage warnings
whitespace micro-preening
When a text with an (escaped) zero byte was passed to ParseValue, only
the part of the string up to the zero byte was copied, but the length of
the full string was passed to the input framework.
This leads to the input manager reading over the end of the buffer.
Fixeszeek/zeek#1398
GCC has a "feature" where it doesn't realize that files in the
src/zeek/... tree are the same as files in the normal 'src/' tree. This
leads the coverage script to send duplicates to Coveralls and pollute
the display with them. The new script scrapes the intermediate output
from lcov and de-duplicates anything in src/zeek/ to be just from src/.
Use of --parse-only would previously exit before --usage-issues had a
chance to analyze scripts and report any discovered issues and it can be
useful to combine both flags for checking scripts for mistakes without
actually executing any code.
This also improves the behavior of --parse-only in combination with
reporting problems in signature files (previously, it exited before
even reading them).
* origin/topic/vern/reaching-defs: (36 commits)
added &is_assigned test case for variable rather than record field
Speedup ReachingDefs logic by ~15%
Simplify ReachingDefs::RDMap() accessor
test for -uu correctly tracking $?, and not misled by conditional assignments
&is_set => &is_assigned
remove pending maybe-reconsider-this comment
fixes for ?$ operator - always track it, and assume subrecords are initialized
speedup (and more coherent memory management) for tracking RDs
fixes for generating and evaluating RDs associate with ?$ expressions
fix for failure to reduce InlineExpr's to CatchReturnStmt's
inlining fix: propagate identifier attributes (such as &is_set)
tidier memory management
fix for an ancient bug - surprising that this hasn't caused problems previously
Fix IntrusivePtr release leaks in reaching-def logic
Change dynamic_cast in reaching-def logic to static_cast
Adjust some reaching-def memory management
Update a couple baselines for "xform" alternative
Adjust various reaching-def move/reference semantics
Change LambdaExpr::OuterIDs() accessor to return const-reference
Simplify declaration of DefPointType enum
...
This enables locating the headers within the install-tree using the
dirs provided by `zeek-config --include_dir`.
To enable locating these headers within the build-tree, this change also
creates a 'build/src/include/zeek -> ..' symlink.
Merge adjustments:
- Removed some stale str_split() references from docs
- Renumbered TypeTag enum comments
- Simplified test-case for @unload (don't need .bro files anymore)
* origin/topic/timw/deprecation-cleanup:
Doc updates
Fix language.init-in-anon-function btest due to changes to log filter predicates
Remove deprecated log filter predicates for 4.1
Remove Plugin::HookCallFunction and fix tests related to it
Remove support for .bro script extension and BRO_ environment variables
Remove deprecated ICMP events
Remove some deprected methods/events from bif files
Remove TYPE_COUNTER
Remove all of the random single-file deprecations
Remove all fully-deprecated files
Update bifcl submodule to remove deprecations from generated code
Script-layer counts, when provided as negative integers in an input
file, got cast to unsigned values because strtoull() does not complain
about negative values. For example, input string "-1" would lead to
value 18446744073709551615 (an all-ones 64-bit int) on x86_64. This is
more likely to be an error than an intent to get very large,
platform-dependent values, so these input lines are now skipped with
according messaging in the reporter.log/stderr.
This also affected ports: -1/tcp got cast to unsigned and only thrown
out because PortVal rejects values > 65535, mapping them to 0. We now
skip such inputs as well.
Updates existing input framework tests to capture the new behavior.
Update the logging framework tests: since hooks operate
by name, they cannot be anonymous. I'm also dropping the &optional
attribute from the status field, since here know that the values are
actually defined, and access to an optional status field should
normally be guarded by the existence test operator.
Also includes baseline update for plugins.hooks, which picks up the
fact that the pred record field is now gone.
This causes some test changes because of the use of Type::Describe in the fnv1a32
BIF method called by hash_hrw::get_site. Since the enum values change with removal
of TYPE_COUNTER, the output from Type::Describe changes slightly.
* 'topic/oakljon/gh-1352-smtp-header-parsing' of https://github.com/theavgjojo/zeek:
GH-1352: Added flag to stop processing SMTP headers in attached messages
* 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
List-types as used in composite table/set indices, for example,
previously had incorrect same_type() comparisons due to flattening
of the list-type into a single type without checking whether the
number and kind of types all match.
This patch simply removes the flatten_type() call from same_type() since
it was already contradicting/preventing a subsequent full-comparison
between elements of two TYPE_LISTs.
There was also a superfluous special-case of the `in` operator's
type-checking for testing whether a record is in a table/set. It's
superfluous because the general case will already do the type-checking
from MatchesIndex() after first wrapping the record operand in a
ListExpr. The previous logic was incorrectly relying on the
flatten_type() for testing equality of a record-type against a
list-type, whereas the general case correctly normalizes to testing
equality of two list-types.
The special-cased type-checking logic for assigning a record value to a
table index during its initialization similarly needed minor
re-organization in order to maintain the same error messages as before.