Commit graph

11690 commits

Author SHA1 Message Date
Jon Siwek
8b498477d4 Merge remote-tracking branch 'origin/topic/vern/cpp-prep2'
* origin/topic/vern/cpp-prep2:
  Avoid a redundant set operation in ProfileFuncs::MergeInProfile()
  Use std::move() where possible in parse.y build_local()/build_global()
  optionally hash original, not extended, form of records for profiling profile types associated with global initializations incorporate type name, if present, into type hash
  fixed out-of-range enum constant
  method to add a fully-qualified enum name (module name included)
  enum types track whether they've had values added via "redef"
  tracking of original size of records (pre redef'ing)
  Added TableVal::ToMap to retrieve a table's entire contents as a unordered_map
  micro whitespace nit
  factoring out some replicated code in the parser
  some micro-preening of parse.y; no semantic changes
  for readability, removed explicit scoping in parse.y; no semantic changes
2021-04-03 09:36:29 -07:00
Jon Siwek
d57848828e Avoid a redundant set operation in ProfileFuncs::MergeInProfile() 2021-04-02 11:55:22 -07:00
Jon Siwek
5ffe25fca8 Use std::move() where possible in parse.y build_local()/build_global() 2021-04-02 11:38:25 -07:00
Vern Paxson
0b45ff2179 optionally hash original, not extended, form of records for profiling
profile types associated with global initializations
incorporate type name, if present, into type hash
2021-04-01 20:20:12 -07:00
Vern Paxson
0f18a01bf7 fixed out-of-range enum constant 2021-04-01 19:16:07 -07:00
Vern Paxson
9557029cf2 method to add a fully-qualified enum name (module name included) 2021-04-01 18:45:42 -07:00
Vern Paxson
341c284de9 enum types track whether they've had values added via "redef" 2021-04-01 18:38:58 -07:00
Vern Paxson
45004872e8 tracking of original size of records (pre redef'ing) 2021-04-01 17:38:31 -07:00
Vern Paxson
6e8baafeb9 Added TableVal::ToMap to retrieve a table's entire contents as a unordered_map 2021-04-01 17:33:37 -07:00
Vern Paxson
4aa73f6f7d micro whitespace nit 2021-04-01 17:33:03 -07:00
Vern Paxson
c92af1e542 factoring out some replicated code in the parser 2021-04-01 17:32:22 -07:00
Vern Paxson
9cdb51e283 some micro-preening of parse.y; no semantic changes 2021-04-01 16:30:48 -07:00
Vern Paxson
e1eb233bbd for readability, removed explicit scoping in parse.y; no semantic changes 2021-04-01 16:27:08 -07:00
Jon Siwek
fe6fd61468 Merge remote-tracking branch 'origin/topic/vern/cpp-prep-profiling'
* origin/topic/vern/cpp-prep-profiling:
  Add missing errno include to ProfileFunc.cc
  Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference
  Fix whitespace in ProfileFunc::PreExpr()
  Avoid redundant map/set searches in various ProfileFunc methods
  Improve detail::script_specific_filename()
  Use std::string_view in p_hash() to avoid string copies
  function profiling rewritten - more detailed info, supports global profiling
  track whether a given function/body should be included/skipped for optimization
2021-04-01 14:14:59 -07:00
Jon Siwek
be21843859 Add missing errno include to ProfileFunc.cc 2021-03-31 15:14:27 -07:00
Jon Siwek
bdadbabf18 Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference 2021-03-31 14:52:01 -07:00
Jon Siwek
dc9e7f6d03 Fix whitespace in ProfileFunc::PreExpr() 2021-03-31 14:50:45 -07:00
Jon Siwek
ccd27a3dfa Avoid redundant map/set searches in various ProfileFunc methods 2021-03-31 14:48:02 -07:00
Jon Siwek
ab1f1f8360 Improve detail::script_specific_filename()
- To handle relative paths that don't start with a '.'
- To handle getcwd() failures
2021-03-31 14:18:36 -07:00
Jon Siwek
d3261238dd Use std::string_view in p_hash() to avoid string copies 2021-03-31 13:22:50 -07:00
Jon Siwek
fb33597372 Merge branch 'master' into topic/vern/cpp-prep-profiling 2021-03-31 12:02:17 -07:00
Jon Siwek
2beaee9318 Add ssh to Alpine Dockerfile for retrieving external test repos 2021-03-31 11:59:04 -07:00
Jon Siwek
3404e4a3d1 Update submodule(s) [nomail] [skip ci] 2021-03-31 11:09:04 -07:00
Jon Siwek
631f19377e Change ci/init-external-repos.sh to use base64 -d
The BusyBox version of `base64` does not have `--decode`.
2021-03-31 10:48:07 -07:00
Jon Siwek
ade37c1dfc Teach ci/init-external-repos.sh to consider user permissions
Any errors while setting up external/private test repo should fail the
task for PRs submitted by a user with write/admin permission.
2021-03-31 10:31:39 -07:00
Jon Siwek
f75da8bb08 Merge remote-tracking branch 'origin/topic/johanna/opensuse-leap'
* origin/topic/johanna/opensuse-leap:
  CI: Add OpenSUSE Leap 15.2
2021-03-31 09:56:30 -07:00
Jon Siwek
ba7b645a9e Merge remote-tracking branch 'origin/topic/jsiwek/ci-alpine'
* origin/topic/jsiwek/ci-alpine:
  Add CI task for Alpine Linux
  Separate stdout from stderr in btest baselines
  Remove newline-eof canonification attempt in diff-remove-timestamps
  Change a <sys/errno.h> include to <errno.h>
2021-03-31 09:54:54 -07:00
Johanna Amann
2f39b66828 CI: Add OpenSUSE Leap 15.2 2021-03-31 16:00:33 +01:00
Jon Siwek
3f95abd0dd Add CI task for Alpine Linux 2021-03-30 17:18:52 -07:00
Jon Siwek
3e9ac00f21 Separate stdout from stderr in btest baselines
Redirecting both to the same file can show platform-specific differences
(e.g. Alpine), likely due to different buffering defaults.
2021-03-30 16:23:23 -07:00
Jon Siwek
8e47494dff Remove newline-eof canonification attempt in diff-remove-timestamps
On Alpine (BusyBox `sed`), the previous `sed -e '$a\'` invocation always
added a newline, breaking most every diff.  There doesn't seem to be a
need to attempt normalizing EOF newlines at the moment and doing it that
way doesn't seem to be portable anyway.  If canonifiers need to be
portable, `sed` should be treated as a text-processing tool and POSIX
definition of text-file is zero or more newline-terminated
character-sequences, so if canonification of Baselines via `sed` is
required, those Baselines should always end with a newline to be
considered text files.  I.e. that's not the job of this canonifier, and
changing it also doesn't necessarily generalize since it could be
considered coincidental that diff-remove-timestamps in particular is the
default canonifier that's commonly used while there's still others that
also make use of `sed`.
2021-03-30 16:04:34 -07:00
Jon Siwek
a15d726f95 Change a <sys/errno.h> include to <errno.h>
Some systems (e.g. Alpine) may warn that that the former is incorrect.
2021-03-30 16:03:14 -07:00
Jon Siwek
75ebc5bca1 Merge branch 'fix_timeval' of https://github.com/abenson/zeek
* 'fix_timeval' of https://github.com/abenson/zeek:
  Fix incomplete-type for struct timeval
2021-03-30 14:58:00 -07:00
Andrew Benson
2ad482535e Fix incomplete-type for struct timeval 2021-03-29 22:41:31 -05:00
Jon Siwek
c033bd20aa Merge remote-tracking branch 'origin/topic/vern/global-stmts'
* origin/topic/vern/global-stmts:
  whitespace adjustment
  "balance" tests with multiple Zeek scripts to load the same elements
  put global statements into a quasi-function to support script optimization
2021-03-29 15:42:43 -07:00
Jon Siwek
b5d1c4342e Merge remote-tracking branch 'origin/topic/jsiwek/misc-val-tweaks'
* origin/topic/jsiwek/misc-val-tweaks:
  Fix sign-compare compiler warning in coerce_to_record()
  Fix maybe-uninitialized warning in ZVal::ToVal()
  Change RecordVal::GetFieldAs() to use std::vector::operator[]
  Add RecordVal::AssignField() and use it in supervisor code
2021-03-29 13:19:57 -07:00
Jon Siwek
e7b8609613 Merge remote-tracking branch 'origin/topic/jsiwek/gh-960-auxil-include-order'
* origin/topic/jsiwek/gh-960-auxil-include-order:
  GH-960: Fix include order of bundled header files
2021-03-29 13:15:51 -07:00
Jon Siwek
a5e7b2fec7 Update bundled CAF to 0.18.2 2021-03-27 14:18:30 -07:00
Jon Siwek
43d9bda007 Fix sign-compare compiler warning in coerce_to_record() 2021-03-26 21:59:30 -07:00
Jon Siwek
db975ac08e Fix maybe-uninitialized warning in ZVal::ToVal()
Some compilers warn that 'v' may be used uninitialized but shouldn't be
the case in practice since all cases are handled, making it impossible.
2021-03-26 19:10:36 -07:00
Jon Siwek
7047eb92d8 Change RecordVal::GetFieldAs() to use std::vector::operator[]
Since the method claims it's up to the user to ensure the field exists
before calling, the extra bounds-checking done by std::vector::at()
isn't needed.
2021-03-26 19:02:24 -07:00
Jon Siwek
2855df63ce Add RecordVal::AssignField() and use it in supervisor code
This is a convenience method to assign a known record field value by
field name.  May also be useful to reduce warnings from static analysis
(e.g. Coverity) about not checking for negative return values before
assigning since that now flows through a [[noreturn]] error path.
2021-03-26 18:57:42 -07:00
Jon Siwek
7bf885b0b8 Merge remote-tracking branch 'origin/topic/vlad/expose_supervisor_rotation_func'
- Restored a deprecated version of 'supervisor_rotation_format_func'
  during merge.

* origin/topic/vlad/expose_supervisor_rotation_func:
  Rename supervisor_rotation_format_func to archiver_rotation_format_func, and expose it for non-supervised setups
2021-03-26 17:18:52 -07:00
Jon Siwek
0eaeca6569 Update submodule(s) [nomail] [skip ci] 2021-03-26 16:51:30 -07:00
Jon Siwek
867abd0b99 Merge remote-tracking branch 'origin/topic/johanna/gh-1454'
* origin/topic/johanna/gh-1454:
  Heartbleed: fix substraction order.
2021-03-26 16:46:42 -07:00
Jon Siwek
a0859276bf Merge remote-tracking branch 'origin/topic/timw/analyzer-crash'
* origin/topic/timw/analyzer-crash:
  Fix crash in Analyzer::ForwardPacket due to recursive analyzer calls.
2021-03-26 16:40:12 -07:00
Jon Siwek
444fd8ff43 GH-960: Fix include order of bundled header files
Previously, a system-wide installation of any bundled auxil/ software
(like CAF) may get found/included rather than the bundled version and
possibly break the build.
2021-03-26 16:26:49 -07:00
Vlad Grigorescu
acfb21c5a6 Rename supervisor_rotation_format_func to archiver_rotation_format_func, and expose it for non-supervised setups
Closes #1463
2021-03-26 15:26:48 -05:00
Tim Wojtulewicz
fdf34c1f7b Include git sha in request to benchmark host 2021-03-25 17:38:02 -07:00
zeek-bot
cbd84dbe52 Update doc submodule [nomail] [skip ci] 2021-03-26 00:35:30 +00:00