diff --git a/CHANGES b/CHANGES index 9d0bff0f40..e86b3ab474 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +5.1.0-dev.7 | 2022-06-06 09:36:32 -0700 + + * NEWS updates for 5.0 (Vern Paxson, Corelight) + + * ZAM test suite updates due to recent changes (Vern Paxson, Corelight) + 5.1.0-dev.1 | 2022-06-03 12:38:20 -0700 * Update local-compat test for 5.1 (Tim Wojtulewicz, Corelight) diff --git a/NEWS b/NEWS index b29a4e5893..3a1a4242f5 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,25 @@ Breaking Changes New Functionality ----------------- +- Zeek now automatically warns about unused functions, hooks, and event + handlers. The intent behind these checks is to catch instances where the + script writer has introduced typos in names, or has forgotten to remove + code that's no longer needed. + + For functions and hooks, "unused" means the function/hook is not exported or + in the global scope (nor deprecated), and no "live" (i.e., not "unused") + function/hook/event handler calls it. For event handlers, "unused" means + that the event engine does not generate the event, nor do any "live" + function/hook/event handler generates (and the event handler is not + deprecated). + + The warnings can occasionally be or inappropriate or incorrect, such as due + to the use of conditional code (which Zeek does not try to incorporate + into its analysis), or events sent via Broker. You can mark such instances + using the ``&is_used`` attribute to suppress the associated warning. + You can also suppress all such warnings using the ``--no-unused-warnings`` + command-line option. + - A new feature, ``--profile-scripts[=file]`` instructs Zeek to write (upon termination) a profile of every function body to the given file (default: stdout), along with some aggregate profiles. A function body is associated @@ -65,6 +84,15 @@ New Functionality Broker documentation for a description of the message format expected over these WebSocket connections. +- Compiling scripts to C++ (via ``-O gen-C++``) is now "feature complete", i.e., + the compiler should be able to process any script - other than those + potentially affected by ``@if`` conditionals - regardless of which Zeek + language constructs it uses. That said, such compilation remains + experimental and only lightly tested. + +- ZAM script optimization (``-O ZAM``) now includes some major performance + improvements. + - The new --with-gen-zam configure flag and its corresponding GEN_ZAM_EXE_PATH cmake variable allow reuse of a previously built Gen-ZAM code generator. This aids cross-compilation: the Zeek build process normally compiles Gen-ZAM on diff --git a/VERSION b/VERSION index 3cb3930079..3e4ff96e6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.0-dev.1 +5.1.0-dev.7 diff --git a/testing/btest/Baseline.zam/broker.store.create-failure/zeek.err b/testing/btest/Baseline.zam/broker.store.create-failure/zeek.err index ec5ccd8aa7..761e4d5db5 100644 --- a/testing/btest/Baseline.zam/broker.store.create-failure/zeek.err +++ b/testing/btest/Baseline.zam/broker.store.create-failure/zeek.err @@ -2,8 +2,8 @@ error: Failed to attach master store backend_failure: error: Could not create Broker master store '../fail' error in <...>/create-failure.zeek, line 49: invalid Broker store handle (Broker::keys(s) and broker::store::{}) -error in <...>/create-failure.zeek, line 56: invalid Broker store handle (check_terminate_conditions() and broker::store::{}) -error in <...>/create-failure.zeek, line 56: invalid Broker store handle (check_terminate_conditions() and broker::store::{}) +error in <...>/store.zeek, line 744: invalid Broker store handle (Broker::__close(Broker::h) and broker::store::{}) +error in <...>/store.zeek, line 744: invalid Broker store handle (Broker::__close(Broker::h) and broker::store::{}) error in <...>/create-failure.zeek, line 49: invalid Broker store handle (Broker::keys(s) and broker::store::{}) error in <...>/create-failure.zeek, line 49: invalid Broker store handle (Broker::keys(s) and broker::store::{}) error in <...>/create-failure.zeek, line 49: invalid Broker store handle (Broker::keys(s) and broker::store::{}) diff --git a/testing/btest/Baseline.zam/core.option-runtime-errors-8/.stderr b/testing/btest/Baseline.zam/core.option-runtime-errors-8/.stderr index 3d205aa81f..b3ee004d7a 100644 --- a/testing/btest/Baseline.zam/core.option-runtime-errors-8/.stderr +++ b/testing/btest/Baseline.zam/core.option-runtime-errors-8/.stderr @@ -1,2 +1,3 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +warning in <...>/option-runtime-errors.zeek, line 4: handler for non-existing event cannot be invoked (option_changed) error: Option::on_change needs function argument; not hook or event