Commit graph

11634 commits

Author SHA1 Message Date
Vern Paxson
12c9b5ede5 flag/environment variable for dumping use-defs 2021-02-05 22:26:24 -08:00
Vern Paxson
8a3622a726 &is_used attribute to suppress set-but-not-used usage warnings 2021-02-05 22:17:36 -08:00
Vern Paxson
772834e375 whitespace micro-preening 2021-02-05 21:03:10 -08:00
Jon Siwek
7363d1040e Update submodule(s) [nomail] [skip ci] 2021-02-05 15:37:05 -08:00
Jon Siwek
ac0b09d1a4 Allow --parse-only to work with --usage-issues flag
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).
2021-02-05 14:46:47 -08:00
Jon Siwek
91dc6fbbb0 Update submodule(s) [nomail] [skip ci] 2021-02-05 12:36:39 -08:00
Jon Siwek
03f74958f3 Merge remote-tracking branch 'origin/topic/vern/reaching-defs'
* 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
  ...
2021-02-05 11:02:01 -08:00
Vern Paxson
7f9ee3d028 added &is_assigned test case for variable rather than record field 2021-02-05 08:22:19 -08:00
Jon Siwek
d7dfb16909 Speedup ReachingDefs logic by ~15%
Mainly from the potential of ReachingDefs::AddRD() performing a
redundant map lookup that it had just done.
2021-02-04 17:23:14 -08:00
Jon Siwek
2c04054975 Simplify ReachingDefs::RDMap() accessor 2021-02-04 15:37:05 -08:00
Vern Paxson
5f79cb7668 test for -uu correctly tracking $?, and not misled by conditional assignments 2021-02-04 12:58:23 -08:00
Vern Paxson
c991c54690 &is_set => &is_assigned 2021-02-04 12:18:46 -08:00
Vern Paxson
d71675a7dc remove pending maybe-reconsider-this comment 2021-02-04 11:51:57 -08:00
Vern Paxson
e336a30963 fixes for ?$ operator - always track it, and assume subrecords are initialized 2021-02-04 11:39:33 -08:00
Vern Paxson
183fbc750f speedup (and more coherent memory management) for tracking RDs 2021-02-03 17:13:51 -08:00
Vern Paxson
5dde3adbdd fixes for generating and evaluating RDs associate with ?$ expressions 2021-02-03 16:51:34 -08:00
Vern Paxson
18bb022dab fix for failure to reduce InlineExpr's to CatchReturnStmt's 2021-02-03 16:49:29 -08:00
Vern Paxson
6f20c0da3f inlining fix: propagate identifier attributes (such as &is_set) 2021-02-03 16:46:07 -08:00
zeek-bot
2494dfee07 Update doc submodule [nomail] [skip ci] 2021-02-04 00:37:36 +00:00
Jon Siwek
c27bf62217 Merge remote-tracking branch 'origin/topic/timw/1389-vntag'
Merge adjustment: changed test case to use `zeek -b`

* origin/topic/timw/1389-vntag:
  GH-1389: Skip VN-Tag headers
2021-02-03 11:22:13 -08:00
Tim Wojtulewicz
3819146511 Merge remote-tracking branch 'origin/topic/jsiwek/include-zeek-dir-bifs'
* origin/topic/jsiwek/include-zeek-dir-bifs:
  Prefix #includes of .bif.h files with zeek/
2021-02-03 09:53:27 -07:00
Tim Wojtulewicz
599b65657e Merge remote-tracking branch 'origin/topic/christian/ci-speedup-macos'
* origin/topic/christian/ci-speedup-macos:
  Bump macOS jobs in CI from 4 to 12 cores
2021-02-03 09:50:54 -07:00
Christian Kreibich
0d9bf23ced Bump macOS jobs in CI from 4 to 12 cores
A recent Cirrus upgrade enables this and saves 4-5 minutes for the
build and test jobs (combined), for both Catalina and Big Sur.
2021-02-02 19:34:20 -08:00
Jon Siwek
c44cbe1feb Prefix #includes of .bif.h files with zeek/
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.
2021-02-02 19:15:05 -08:00
Vern Paxson
cb9a959978 tidier memory management 2021-02-02 17:00:28 -08:00
Vern Paxson
be54599896 fix for an ancient bug - surprising that this hasn't caused problems previously 2021-02-02 16:59:21 -08:00
Jon Siwek
c348ab7916 Update submodule(s) [nomail] [skip ci] 2021-02-02 16:20:12 -08:00
Jon Siwek
aa03e54ba0 Fix IntrusivePtr release leaks in reaching-def logic 2021-02-01 23:25:15 -08:00
Jon Siwek
6c80052c55 Change dynamic_cast in reaching-def logic to static_cast 2021-02-01 22:57:46 -08:00
Jon Siwek
6d3df74788 Adjust some reaching-def memory management
E.g. can use unique_ptr or just avoid heap-allocating as minor
simplification of some mem-mgmt logic.
2021-02-01 22:54:17 -08:00
Jon Siwek
01f194edbe Update a couple baselines for "xform" alternative 2021-02-01 22:07:32 -08:00
Jon Siwek
36f27a0d01 Adjust various reaching-def move/reference semantics
Nothing that important, just changing things to what is hypothetically
more efficient in general.
2021-02-01 22:00:56 -08:00
Jon Siwek
1f7580db65 Change LambdaExpr::OuterIDs() accessor to return const-reference 2021-02-01 18:06:19 -08:00
Jon Siwek
990bbb1626 Simplify declaration of DefPointType enum 2021-02-01 17:54:57 -08:00
Jon Siwek
40b41964f9 Fix a sign-compare compiler warning 2021-02-01 17:32:27 -08:00
Jon Siwek
cfe29c2488 Merge branch 'master' into topic/vern/reaching-defs 2021-02-01 17:27:37 -08:00
Jon Siwek
38c7657d28 Update submodule(s) [nomail] [skip ci] 2021-02-01 16:48:07 -08:00
Jon Siwek
3d97803d7d Update documentation to include "Book of Zeek" revisions 2021-02-01 15:54:36 -08:00
Tim Wojtulewicz
f53448ccc9 GH-1389: Skip VN-Tag headers 2021-02-01 14:34:56 -07:00
Jon Siwek
dacdf5424b Merge remote-tracking branch 'origin/topic/jsiwek/deprecate-zeekenv'
* origin/topic/jsiwek/deprecate-zeekenv:
  Deprecate zeekenv() and use getenv() directly
2021-02-01 12:13:47 -08:00
Jon Siwek
85b1cfd321 Merge remote-tracking branch 'origin/topic/jsiwek/include-zeek-dir'
* origin/topic/jsiwek/include-zeek-dir:
  Add missing zeek/ to header includes
2021-01-29 21:09:12 -08:00
Jon Siwek
8a8a983c49 Add missing zeek/ to header includes
Related to https://github.com/zeek/zeek/pull/1377
2021-01-29 19:16:29 -08:00
Jon Siwek
b8c563dbdd Deprecate zeekenv() and use getenv() directly 2021-01-29 16:55:44 -08:00
Jon Siwek
79f9979f80 Merge branch 'master' of https://github.com/zeek/zeek 2021-01-29 16:41:08 -08:00
Jon Siwek
1ca85f0221 Merge remote-tracking branch 'origin/topic/timw/deprecation-cleanup'
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
2021-01-29 16:40:54 -08:00
zeek-bot
229739c0ae Update doc submodule [nomail] [skip ci] 2021-01-30 00:34:42 +00:00
Jon Siwek
48354e1409 Merge remote-tracking branch 'origin/topic/christian/fix-inputframework-negints'
* origin/topic/christian/fix-inputframework-negints:
  Skip negative integers in input framework where not type-permissible
2021-01-29 10:32:13 -08:00
Tim Wojtulewicz
447b40d89e Merge remote-tracking branch 'origin/topic/jsiwek/fix-broken-links'
* origin/topic/jsiwek/fix-broken-links:
  Fix various broken links in script documentation
2021-01-29 09:54:17 -07:00
Christian Kreibich
38d6b6a98b Skip negative integers in input framework where not type-permissible
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.
2021-01-28 23:46:43 -08:00
Jon Siwek
e82824b638 Fix various broken links in script documentation 2021-01-28 17:46:58 -08:00