Commit graph

11475 commits

Author SHA1 Message Date
Vern Paxson
6121e409d3 convert RecordVal's to use vector<ZVal> as internal representation 2021-02-24 17:02:47 -08:00
Vern Paxson
348e14c326 added ZVal for low-level representations of Zeek script values 2021-02-24 16:41:35 -08:00
Vern Paxson
b065582319 fix mis-typed record fields that happened to work in original RecordVal impl. 2021-02-24 16:33:17 -08:00
Vern Paxson
e64805430b fix off-by-one assumption regarding vector indexing dating to 2011 2021-02-24 16:31:07 -08:00
Jon Siwek
3179df9ab2 Merge remote-tracking branch 'origin/topic/jsiwek/file-analyzer-disabling'
* origin/topic/jsiwek/file-analyzer-disabling:
  Support explicit disabling of file analyzers
2021-02-24 12:37:24 -08:00
Jon Siwek
737d2c390b Support explicit disabling of file analyzers 2021-02-23 15:50:18 -08:00
Jon Siwek
8c4092a0ad Update submodule(s) [nomail] [skip ci] 2021-02-23 12:25:37 -08:00
Jon Siwek
80221cb958 Merge remote-tracking branch 'origin/topic/vern/use-defs'
- 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
2021-02-23 12:11:24 -08:00
Vern Paxson
86709c5992 activate &is_used 2021-02-23 08:32:14 -08:00
Jon Siwek
0ec08d7c9b Update submodule(s) [nomail] 2021-02-22 15:50:02 -08:00
Jon Siwek
023bed5299 Update submodule(s) [nomail] [skip ci] 2021-02-16 14:06:27 -08:00
Jon Siwek
666afc58ed Update Broker submodule for performance/credit-tracking fixes 2021-02-16 12:34:11 -08:00
Jon Siwek
ba46ed25d9 Merge remote-tracking branch 'origin/topic/jsiwek/fix-pe-major-subsys'
* origin/topic/jsiwek/fix-pe-major-subsys:
  Fix `major_subsys_version` field in `pe_optional_header` event
2021-02-16 11:10:57 -08:00
Jon Siwek
c54a413bae Update submodule(s) [nomail] [skip ci] 2021-02-16 10:55:25 -08:00
Jon Siwek
f420cc2544 Fix CentOS 8 CI Dockerfile
The "PowerTools" repoid changed to "powertools":
https://bugs.centos.org/view.php?id=17920
2021-02-12 14:40:52 -08:00
Jon Siwek
a636f8edbd Merge fix for GH-1398 allowing null-bytes in ASCII input files
* Commits:
  Ascii reader test with 0-bytes
  Fix buffer overread in ascii formatter
2021-02-12 11:30:15 -08:00
Johanna Amann
6c554ddde3 Ascii reader test with 0-bytes
Add a second test, which contains actual 0-bytes.
2021-02-12 14:49:33 +00:00
Johanna Amann
61290fc19c Fix buffer overread in ascii formatter
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.

Fixes zeek/zeek#1398
2021-02-12 14:24:36 +00:00
Jon Siwek
69d73f7c83 Fix major_subsys_version field in pe_optional_header event
It was incorrectly set the same as the `minor_subsys_version` field
of the `PE::OptionalHeader` record.
2021-02-11 21:14:34 -08:00
Jon Siwek
021a31b29a Update submodule(s) [nomail] [skip ci] 2021-02-11 12:11:44 -08:00
Jon Siwek
3405b961b9 Remove RocksDB configure script options
Fixes GH-1399
2021-02-11 11:13:17 -08:00
Jon Siwek
0717e01b6b Merge remote-tracking branch 'origin/topic/timw/coverage-loop-fixes'
* origin/topic/timw/coverage-loop-fixes:
  Add a script to cleanup the file listing before sending to Coveralls
2021-02-11 10:56:42 -08:00
Vern Paxson
f82d443225 Merge branch 'topic/vern/use-defs' of github.com:zeek/zeek into topic/vern/use-defs 2021-02-10 19:09:28 -08:00
Vern Paxson
dc80d2f36f removed unnecessary statement flagged by Coverity (thanks, Jon!) 2021-02-10 19:08:52 -08:00
Tim Wojtulewicz
a05356eb79 Add a script to cleanup the file listing before sending to Coveralls
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/.
2021-02-09 23:07:47 +00:00
Jon Siwek
b450b90a3e Adjust reference/move nitpicks in use-def/reduce code
Use std::move() and avoid superfluous copies by assigning to
const-reference in a few places.
2021-02-08 17:53:21 -08:00
Jon Siwek
8d452f58fc Adjust some whitespace in UseDefs.cc 2021-02-08 17:48:53 -08:00
Jon Siwek
e460d66e03 Update submodule(s) [nomail] 2021-02-08 15:42:12 -08:00
Jon Siwek
419c68b188 Merge remote-tracking branch 'origin/topic/jsiwek/parse-only-usage-errors'
* origin/topic/jsiwek/parse-only-usage-errors:
  Allow --parse-only to work with --usage-issues flag
2021-02-08 13:06:23 -08:00
Vern Paxson
b714fde456 updates to "usage" test suite alternative now that more warnings are generated 2021-02-06 11:07:26 -08:00
Vern Paxson
1605b57dec suppress usage warning in baseline script 2021-02-06 11:05:53 -08:00
Vern Paxson
991bd51430 "xform" alternative baseline update, needed for recent change to master 2021-02-06 11:04:53 -08:00
Vern Paxson
6838ef66b4 baseline update due to shift in number of lines in base intel framework script 2021-02-06 11:04:17 -08:00
Vern Paxson
da40c580b2 environment variable (which has precedence) not flags for baseline usage test 2021-02-06 11:01:30 -08:00
Vern Paxson
0a6270365f splitting out "usage" test suite alternative into -u/-uu versions 2021-02-06 11:01:04 -08:00
Vern Paxson
f21f7b65d5 adding &is_used attribute for base scripts - not actually needed yet, but will be once optimization is added 2021-02-06 10:59:58 -08:00
Vern Paxson
4f2b138e72 removing unused assignments from base scripts 2021-02-06 10:59:37 -08:00
Vern Paxson
94b85e3527 driver glue for invoking use-def construction 2021-02-06 10:58:56 -08:00
Vern Paxson
372fb8b197 classes for managing and propagating use-defs 2021-02-06 10:57:56 -08:00
Vern Paxson
2114c4a26b enhancements/changes to the Reduce class in preparation for use-defs 2021-02-06 09:52:35 -08:00
Vern Paxson
a067f4c5b0 some tidying with smart pointers 2021-02-06 09:49:37 -08:00
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