mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Merge remote-tracking branch 'origin/topic/vern/zam-maint-01May22'
* origin/topic/vern/zam-maint-01May22: fix for coverage reporting for functions that use "when" statements ZAM maintenance for recent changes and some newly exercised corner cases
This commit is contained in:
commit
1d1cad95c9
9 changed files with 44 additions and 19 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
|||
5.0.0-dev.344 | 2022-05-04 11:57:50 -0700
|
||||
|
||||
* fix for coverage reporting for functions that use "when" statements (Vern Paxson, Corelight)
|
||||
|
||||
* ZAM maintenance for recent changes and some newly exercised corner cases (Vern Paxson, Corelight)
|
||||
|
||||
5.0.0-dev.341 | 2022-05-04 09:23:55 -0700
|
||||
|
||||
* Fixes Coverity issues reported from DNS_Mgr merge (Tim Wojtulewicz, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
5.0.0-dev.341
|
||||
5.0.0-dev.344
|
||||
|
|
|
@ -2073,7 +2073,7 @@ void WhenStmt::StmtDescribe(ODesc* d) const
|
|||
wi->WhenBody()->Describe(d);
|
||||
d->PopIndent();
|
||||
|
||||
if ( wi->TimeoutStmt() )
|
||||
if ( wi->TimeoutExpr() )
|
||||
{
|
||||
if ( d->IsReadable() )
|
||||
{
|
||||
|
@ -2088,7 +2088,10 @@ void WhenStmt::StmtDescribe(ODesc* d) const
|
|||
d->PopIndent();
|
||||
}
|
||||
else
|
||||
{
|
||||
wi->TimeoutExpr()->Describe(d);
|
||||
wi->TimeoutStmt()->Describe(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2175,8 +2175,7 @@ ExprPtr ArithCoerceExpr::Reduce(Reducer* c, StmtPtr& red_stmt)
|
|||
|
||||
red_stmt = nullptr;
|
||||
|
||||
if ( ! op->IsReduced(c) )
|
||||
op = op->ReduceToSingleton(c, red_stmt);
|
||||
op = op->ReduceToSingleton(c, red_stmt);
|
||||
|
||||
if ( op->Tag() == EXPR_CONST )
|
||||
{
|
||||
|
|
|
@ -800,6 +800,16 @@ void ZAMCompiler::CheckSlotUse(int slot, const ZInstI* inst)
|
|||
|
||||
void ZAMCompiler::ExtendLifetime(int slot, const ZInstI* inst)
|
||||
{
|
||||
// When using old-style lambda closure semantics, a function that
|
||||
// returns a lambda needs to stick around for calls to that lambda.
|
||||
// We ensure that by extending its lifetime to the end of this
|
||||
// function.
|
||||
auto id = frame_denizens[slot];
|
||||
auto& t = id->GetType();
|
||||
|
||||
if ( t->Tag() == TYPE_FUNC && t->Yield() && t->Yield()->Tag() == TYPE_FUNC )
|
||||
inst = insts1.back();
|
||||
|
||||
if ( denizen_ending.count(slot) > 0 )
|
||||
{
|
||||
// End of denizen's lifetime already seen. Check for
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
| Hook Some Info <...>/reporter-hook.zeek, line 16
|
||||
| Hook error An Error <...>/reporter-hook.zeek, line 18
|
||||
| Hook error An Error that does not show up in the log <...>/reporter-hook.zeek, line 19
|
||||
| Hook runtime error field value missing: $a <...>/reporter-hook.zeek, line 23
|
||||
| Hook warning A warning <...>/reporter-hook.zeek, line 17
|
||||
<...>/reporter-hook.zeek, line 16: Some Info
|
||||
error in <...>/reporter-hook.zeek, line 18: An Error
|
||||
error in <...>/reporter-hook.zeek, line 19: An Error that does not show up in the log
|
||||
runtime error in <...>/reporter-hook.zeek, line 23: field value missing: $a
|
||||
warning in <...>/reporter-hook.zeek, line 17: A warning
|
||||
Reporter::Hook - Exercise Reporter Hook (dynamic, version 1.0.0)
|
||||
Implements Reporter (priority 0)
|
||||
|
||||
| Hook Some Info <...>/reporter-hook.zeek, line 17
|
||||
| Hook error An Error <...>/reporter-hook.zeek, line 19
|
||||
| Hook error An Error that does not show up in the log <...>/reporter-hook.zeek, line 20
|
||||
| Hook runtime error field value missing: $a <...>/reporter-hook.zeek, line 24
|
||||
| Hook warning A warning <...>/reporter-hook.zeek, line 18
|
||||
<...>/reporter-hook.zeek, line 17: Some Info
|
||||
error in <...>/reporter-hook.zeek, line 19: An Error
|
||||
error in <...>/reporter-hook.zeek, line 20: An Error that does not show up in the log
|
||||
runtime error in <...>/reporter-hook.zeek, line 24: field value missing: $a
|
||||
warning in <...>/reporter-hook.zeek, line 18: A warning
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#open XXXX-XX-XX-XX-XX-XX
|
||||
#fields ts level message location
|
||||
#types time enum string string
|
||||
XXXXXXXXXX.XXXXXX Reporter::INFO Some Info <...>/reporter-hook.zeek, line 16
|
||||
XXXXXXXXXX.XXXXXX Reporter::WARNING A warning <...>/reporter-hook.zeek, line 17
|
||||
XXXXXXXXXX.XXXXXX Reporter::ERROR An Error <...>/reporter-hook.zeek, line 18
|
||||
XXXXXXXXXX.XXXXXX Reporter::ERROR field value missing: $a <...>/reporter-hook.zeek, line 23
|
||||
XXXXXXXXXX.XXXXXX Reporter::INFO Some Info <...>/reporter-hook.zeek, line 17
|
||||
XXXXXXXXXX.XXXXXX Reporter::WARNING A warning <...>/reporter-hook.zeek, line 18
|
||||
XXXXXXXXXX.XXXXXX Reporter::ERROR An Error <...>/reporter-hook.zeek, line 19
|
||||
XXXXXXXXXX.XXXXXX Reporter::ERROR field value missing: $a <...>/reporter-hook.zeek, line 24
|
||||
#close XXXX-XX-XX-XX-XX-XX
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# @TEST-EXEC: zeek %INPUT
|
||||
# @TEST-EXEC: zeek -b %INPUT
|
||||
# @TEST-DOC: Regression test #2017; no output check, just shouldn't crash
|
||||
|
||||
redef table_expire_interval = 0.1sec;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# the scripts and triggers the timeout. Ultimately we need to address this
|
||||
# by capping the size of inlined functions, since the main delay comes from
|
||||
# traversing enormous AST function bodies.
|
||||
# @TEST-REQUIRES: test "${ZEEK_ZAM}" != "1"
|
||||
# @TEST-PORT: BROKER_PORT1
|
||||
# @TEST-PORT: BROKER_PORT2
|
||||
# @TEST-PORT: BROKER_PORT3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue