mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
ZAM maintenance for recent changes and some newly exercised corner cases
This commit is contained in:
parent
aa5a5b2136
commit
7a9c6c476e
6 changed files with 33 additions and 17 deletions
|
@ -2175,8 +2175,7 @@ ExprPtr ArithCoerceExpr::Reduce(Reducer* c, StmtPtr& red_stmt)
|
||||||
|
|
||||||
red_stmt = nullptr;
|
red_stmt = nullptr;
|
||||||
|
|
||||||
if ( ! op->IsReduced(c) )
|
op = op->ReduceToSingleton(c, red_stmt);
|
||||||
op = op->ReduceToSingleton(c, red_stmt);
|
|
||||||
|
|
||||||
if ( op->Tag() == EXPR_CONST )
|
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)
|
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 )
|
if ( denizen_ending.count(slot) > 0 )
|
||||||
{
|
{
|
||||||
// End of denizen's lifetime already seen. Check for
|
// 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.
|
### 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
|
Reporter::Hook - Exercise Reporter Hook (dynamic, version 1.0.0)
|
||||||
| Hook error An Error <...>/reporter-hook.zeek, line 18
|
Implements Reporter (priority 0)
|
||||||
| 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 Some Info <...>/reporter-hook.zeek, line 17
|
||||||
| Hook warning A warning <...>/reporter-hook.zeek, line 17
|
| Hook error An Error <...>/reporter-hook.zeek, line 19
|
||||||
<...>/reporter-hook.zeek, line 16: Some Info
|
| Hook error An Error that does not show up in the log <...>/reporter-hook.zeek, line 20
|
||||||
error in <...>/reporter-hook.zeek, line 18: An Error
|
| Hook runtime error field value missing: $a <...>/reporter-hook.zeek, line 24
|
||||||
error in <...>/reporter-hook.zeek, line 19: An Error that does not show up in the log
|
| Hook warning A warning <...>/reporter-hook.zeek, line 18
|
||||||
runtime error in <...>/reporter-hook.zeek, line 23: field value missing: $a
|
<...>/reporter-hook.zeek, line 17: Some Info
|
||||||
warning in <...>/reporter-hook.zeek, line 17: A warning
|
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
|
#open XXXX-XX-XX-XX-XX-XX
|
||||||
#fields ts level message location
|
#fields ts level message location
|
||||||
#types time enum string string
|
#types time enum string string
|
||||||
XXXXXXXXXX.XXXXXX Reporter::INFO Some Info <...>/reporter-hook.zeek, line 16
|
XXXXXXXXXX.XXXXXX Reporter::INFO Some Info <...>/reporter-hook.zeek, line 17
|
||||||
XXXXXXXXXX.XXXXXX Reporter::WARNING A warning <...>/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 18
|
XXXXXXXXXX.XXXXXX Reporter::ERROR An Error <...>/reporter-hook.zeek, line 19
|
||||||
XXXXXXXXXX.XXXXXX Reporter::ERROR field value missing: $a <...>/reporter-hook.zeek, line 23
|
XXXXXXXXXX.XXXXXX Reporter::ERROR field value missing: $a <...>/reporter-hook.zeek, line 24
|
||||||
#close XXXX-XX-XX-XX-XX-XX
|
#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
|
# @TEST-DOC: Regression test #2017; no output check, just shouldn't crash
|
||||||
|
|
||||||
redef table_expire_interval = 0.1sec;
|
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_PORT1
|
||||||
# @TEST-PORT: BROKER_PORT2
|
# @TEST-PORT: BROKER_PORT2
|
||||||
# @TEST-PORT: BROKER_PORT3
|
# @TEST-PORT: BROKER_PORT3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue