Commit graph

56 commits

Author SHA1 Message Date
Vern Paxson
048e524fbf specialized ZAM operators for speeding up cat() operations 2022-09-16 09:45:05 -07:00
Vern Paxson
5fe4eb27a8 ZAM support for two-valued "for" loops over vectors 2022-09-16 09:40:39 -07:00
Tim Wojtulewicz
2abc82722f Fix a swath of AUTO_CAUSES_COPY issues reported by Coverity 2022-08-15 09:45:46 -07:00
Vern Paxson
f535a7c3a7 ZAM support for bit-shifting 2022-07-30 18:33:57 -07:00
Vern Paxson
6185d1c389 ZAM fix for vector "in" operator 2022-07-30 18:17:13 -07:00
Tim Wojtulewicz
f624c18383 Deprecate bro_int_t and bro_uint_t 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
1226aa538a Merge remote-tracking branch 'origin/topic/vern/zam-vector-cond-fix'
* origin/topic/vern/zam-vector-cond-fix:
  Fix for ZAM optimization of '?' conditional with vector-valued result
2022-07-11 09:44:05 -07:00
Vern Paxson
0706e8869d Fix for ZAM optimization of '?' conditional with vector-valued result 2022-07-07 13:08:28 -07:00
Tim Wojtulewicz
47e7fe2cd1 Convert Dictionary types to be templated classes
This has the fortunate side-effect of also making it so we can store
the value objects as typed pointers, instead of void*.
2022-07-05 13:33:34 -07:00
Vern Paxson
5a0a88526e removed deprecated capture-by-reference closures 2022-06-17 15:55:43 -07:00
Tim Wojtulewicz
8b0263cb39 Merge remote-tracking branch 'origin/topic/vern/script-profiling'
* origin/topic/vern/script-profiling:
  tidy up after generating profile
  test suite updates for refined script coverage, use of new BiF to speed startup
  fix for coverage reporting for functions that use "when" statements
  new global_options() BiF to speed up startup, plus a micro-preen
  hooks for new --profile-scripts option
  classes for managing script profiles
  address some holes in script coverage
  fix for script coverage missing on-exit activity
  memory management fixes for loggers
  make curr_CPU_time() broadly available rather than just isolated to ZAM
2022-05-11 12:56:41 -07:00
Vern Paxson
41aee03c17 make curr_CPU_time() broadly available rather than just isolated to ZAM 2022-05-03 10:38:32 -07:00
Vern Paxson
7a9c6c476e ZAM maintenance for recent changes and some newly exercised corner cases 2022-05-01 14:33:58 -07:00
Tim Wojtulewicz
e0ad92c9f4 Merge remote-tracking branch 'origin/topic/vern/ZAM-frame-opt'
* origin/topic/vern/ZAM-frame-opt:
  reduce interpreter frames for compiled function bodies
2022-04-05 18:04:28 -07:00
Vern Paxson
03194949c9 reduce interpreter frames for compiled function bodies 2022-04-01 18:00:11 -07:00
Vern Paxson
84dc430e00 fix & btest for ZAM bug with inlined nested loop 2022-04-01 14:04:50 -07:00
Christian Kreibich
aa8f11fa17 Merge branch 'topic/christian/gh-1963'
* 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
2022-03-28 17:05:09 -07:00
Vern Paxson
16a16948a1 updates for ZAM optimization 2022-03-23 15:36:36 -07:00
Christian Kreibich
e403dd5fe1 Build Gen-ZAM from a submodule and support use of pre-existing executable
This separates Gen-ZAM from the main Zeek distribution and places it in a
submodule at auxil/gen-zam, reflecting binpac and bifcl. Configuring with
--with-gen-zam=... allws reuse of an existing executable.
2022-03-21 15:30:07 -07:00
Tim Wojtulewicz
a117c81d85 Fixing a big pile of Coverity issues
1469562/1469558: Uninitialized fields in Func constructor
1469571/1469566: Null pointer dereference in Trigger::Init()
1469568: Uninitialized fields in CounterVector constructor
1469570: Uncaught exception in plugin manager
1469569: Resource leak in script_opt::Stmt
1469561/1469561: Uninitialized fields in ZBody constructor
1469559: Uninitialized fields in logging::Manager
1469563: Resource leak in ZAMCompiler::CompileDel
1469549/1469553/1469556: Context not fully initialized in HashVals
1469548: Remove dead code from IPAddr
1469551/1469554: Handle iosource_mgr registration failure in broker::Manager
1469552/1469572: Resource leaks in input::Manager
2022-02-09 14:07:11 -07:00
Tim Wojtulewicz
3d9d6e953b Merge remote-tracking branch 'origin/topic/vern/when-lambda'
* origin/topic/vern/when-lambda:
  explicitly provide the frame for evaluating a "when" timeout expression
  attempt to make "when" btest deterministic
  tests for new "when" semantics/errors
  update existing test suite usage of "when" statements to include captures
  update uses of "when" in base scripts to include captures
  captures for "when" statements update Triggers to IntrusivePtr's and simpler AST traversal introduce IDSet type, migrate associated "ID*" types to "const ID*"
  logic (other than in profiling) for assignments that yield separate values
  option for internal use to mark a function type as allowing non-expression returns
  removed some now-obsolete profiling functionality
  minor commenting clarifications
2022-01-14 14:41:42 -07:00
Tim Wojtulewicz
2accf6dfbf Merge remote-tracking branch 'origin/topic/vern/CPP-type-switch'
* origin/topic/vern/CPP-type-switch:
  support for compiling type-based switches to C++
  make encountering uncompilable "standalone" functions to be a hard error
  fix: ZAM could misinterpret a "type" switch that starts with a "default"
  fix: don't treat pseudo-identifiers in type cases as local variables
  removed development helper scripts now obsolete with --optimize-files=
2022-01-11 15:02:52 -07:00
Tim Wojtulewicz
9834793386 Fix uninitialized variable warning 2022-01-10 17:06:39 -07:00
Vern Paxson
f895008c34 captures for "when" statements
update Triggers to IntrusivePtr's and simpler AST traversal
introduce IDSet type, migrate associated "ID*" types to "const ID*"
2022-01-07 14:50:35 -08:00
Vern Paxson
334f7f4ada addressed a couple of memory leaks in ZAM execution 2022-01-06 13:54:07 -07:00
Vern Paxson
7a66b4fea4 fix: ZAM could misinterpret a "type" switch that starts with a "default" 2021-12-23 11:37:45 -08:00
Vern Paxson
bbae2cf36c minor efficiency tweak for ZAM record construction 2021-12-12 12:31:28 -08:00
Vern Paxson
3f9f47980a updates to ZAM to track recent changes in script semantics 2021-12-04 20:24:39 -05:00
Tim Wojtulewicz
6a5b51eba8 Merge remote-tracking branch 'origin/topic/timw/coverity-fixes'
* origin/topic/timw/coverity-fixes:
  Fix a number of Coverity findings
2021-11-29 13:47:08 -07:00
Tim Wojtulewicz
72604f866b Fix a number of Coverity findings
1466460: Uninitialized field in gtp-analyzer.pac
1462465: Null pointer dereference in CompositeHash::SingleValHash
1462463: Copy/paste error in TCPSessionAdapter::build_syn_packet_val
1462067: Uninitialized fields in Zinst
2021-11-29 10:43:34 -07:00
Vern Paxson
a830c269ab address clang 10 warnings 2021-11-24 11:56:01 -08:00
Tim Wojtulewicz
9af6b2f48d clang-format: Set penalty for breaking after assignment operator 2021-09-27 10:49:48 -07:00
Tim Wojtulewicz
4423574d26 clang-format: Set IndentCaseBlocks to false 2021-09-27 10:49:48 -07:00
Tim Wojtulewicz
cb99ae2b7c clang-format: Enforce ordering of includes in ZBody 2021-09-25 11:52:55 -07:00
Tim Wojtulewicz
30aa4621c5 Minor fixes for build problems after reformatting 2021-09-16 15:36:09 -07:00
Tim Wojtulewicz
b2f171ec69 Reformat the world 2021-09-16 15:35:39 -07:00
Vern Paxson
81e8354ada still more nit-squashing 2021-09-14 16:04:04 -07:00
Vern Paxson
10d8c2fe6b avoiding using back() for an empty std::string 2021-09-14 13:51:46 -07:00
Vern Paxson
57fdef573c additional tweaks to address some compiler warnings 2021-09-14 11:45:50 -07:00
Vern Paxson
693fc14eb2 tweaks to address some compiler warnings 2021-09-13 19:55:26 -07:00
Vern Paxson
7f3993ca0e tweaks to address concerns flagged by Coverity 2021-09-13 12:57:15 -07:00
Vern Paxson
196b8767e8 fixes for vector coercion overflows, typing, and holes 2021-09-08 10:23:39 -07:00
Vern Paxson
a67897135e factoring out logic to check for overflows during coercions 2021-09-08 10:23:39 -07:00
Vern Paxson
38578a2ea3 low-level cleanups found by code review 2021-09-08 10:23:39 -07:00
Vern Paxson
8bc04d3593 additional conversions of size() to empty() checks that were missed previously 2021-09-08 10:23:39 -07:00
Vern Paxson
9d38946a95 indentation nit 2021-09-08 10:23:39 -07:00
Vern Paxson
bd7edd27fd flag loop that has slightly subtle logic 2021-09-08 10:23:38 -07:00
Vern Paxson
d58573adb1 use ## to start major sections 2021-09-08 10:23:38 -07:00
Vern Paxson
b6daf14868 a number of low-level tweaks from code review 2021-09-08 10:23:38 -07:00
Vern Paxson
c10737d168 use std::find_if rather than explicit loop 2021-09-08 10:23:38 -07:00