mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
maintenance updates for -O ZAM
This commit is contained in:
parent
66c5bdbeac
commit
ab7cccf9b6
8 changed files with 72 additions and 9 deletions
|
@ -344,7 +344,10 @@ eval --frame[z.v1].int_val;
|
||||||
op DecrU
|
op DecrU
|
||||||
op1-read-write
|
op1-read-write
|
||||||
type V
|
type V
|
||||||
eval --frame[z.v1].uint_val;
|
eval auto& u = frame[z.v1].uint_val;
|
||||||
|
if ( u == 0 )
|
||||||
|
ZAM_run_time_warning(z.loc, "count underflow");
|
||||||
|
--u;
|
||||||
|
|
||||||
unary-op AppendTo
|
unary-op AppendTo
|
||||||
# Note, even though it feels like appending both reads and modifies
|
# Note, even though it feels like appending both reads and modifies
|
||||||
|
@ -1559,6 +1562,9 @@ type CiH
|
||||||
op1-read
|
op1-read
|
||||||
eval EvalScheduleArgs(z.c, z.v1,)
|
eval EvalScheduleArgs(z.c, z.v1,)
|
||||||
|
|
||||||
|
macro QueueEvent(eh, args)
|
||||||
|
if ( *eh )
|
||||||
|
event_mgr.Enqueue(eh, std::move(args));
|
||||||
|
|
||||||
op Event
|
op Event
|
||||||
type HL
|
type HL
|
||||||
|
@ -1566,19 +1572,19 @@ op1-read
|
||||||
custom-method return CompileEvent(h, l);
|
custom-method return CompileEvent(h, l);
|
||||||
eval ValVec args;
|
eval ValVec args;
|
||||||
z.aux->FillValVec(args, frame);
|
z.aux->FillValVec(args, frame);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
internal-op Event0
|
internal-op Event0
|
||||||
type X
|
type X
|
||||||
eval ValVec args(0);
|
eval ValVec args(0);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
internal-op Event1
|
internal-op Event1
|
||||||
type V
|
type V
|
||||||
op1-read
|
op1-read
|
||||||
eval ValVec args(1);
|
eval ValVec args(1);
|
||||||
args[0] = frame[z.v1].ToVal(z.t);
|
args[0] = frame[z.v1].ToVal(z.t);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
internal-op Event2
|
internal-op Event2
|
||||||
type VV
|
type VV
|
||||||
|
@ -1586,7 +1592,7 @@ op1-read
|
||||||
eval ValVec args(2);
|
eval ValVec args(2);
|
||||||
args[0] = frame[z.v1].ToVal(z.t);
|
args[0] = frame[z.v1].ToVal(z.t);
|
||||||
args[1] = frame[z.v2].ToVal(z.t2);
|
args[1] = frame[z.v2].ToVal(z.t2);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
internal-op Event3
|
internal-op Event3
|
||||||
type VVV
|
type VVV
|
||||||
|
@ -1596,7 +1602,7 @@ eval ValVec args(3);
|
||||||
args[1] = frame[z.v2].ToVal(z.t2);
|
args[1] = frame[z.v2].ToVal(z.t2);
|
||||||
auto types = z.aux->types;
|
auto types = z.aux->types;
|
||||||
args[2] = frame[z.v3].ToVal(types[2]);
|
args[2] = frame[z.v3].ToVal(types[2]);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
internal-op Event4
|
internal-op Event4
|
||||||
type VVVV
|
type VVVV
|
||||||
|
@ -1607,7 +1613,7 @@ eval ValVec args(4);
|
||||||
auto types = z.aux->types;
|
auto types = z.aux->types;
|
||||||
args[2] = frame[z.v3].ToVal(types[2]);
|
args[2] = frame[z.v3].ToVal(types[2]);
|
||||||
args[3] = frame[z.v4].ToVal(types[3]);
|
args[3] = frame[z.v4].ToVal(types[3]);
|
||||||
event_mgr.Enqueue(z.event_handler, std::move(args));
|
QueueEvent(z.event_handler, args);
|
||||||
|
|
||||||
|
|
||||||
op Return
|
op Return
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
reply, CHhAvVGS1DHFjwGM9, OK, example.com POP3-Server
|
||||||
|
request, CHhAvVGS1DHFjwGM9, USER, zeek@zeek.org
|
||||||
|
reply, CHhAvVGS1DHFjwGM9, OK, Please enter your password
|
||||||
|
request, CHhAvVGS1DHFjwGM9, PASS, zeek
|
||||||
|
reply, CHhAvVGS1DHFjwGM9, OK, mailbox locked and ready
|
||||||
|
request, CHhAvVGS1DHFjwGM9, STAT,
|
||||||
|
1, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (+)
|
||||||
|
2, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (???)
|
||||||
|
3, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (..)
|
||||||
|
4, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (???)
|
||||||
|
5, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (..x)
|
||||||
|
reply, CHhAvVGS1DHFjwGM9, OK, 1 236
|
||||||
|
request, CHhAvVGS1DHFjwGM9, QUIT,
|
||||||
|
reply, CHhAvVGS1DHFjwGM9, OK, Bye
|
|
@ -0,0 +1,13 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
#separator \x09
|
||||||
|
#set_separator ,
|
||||||
|
#empty_field (empty)
|
||||||
|
#unset_field -
|
||||||
|
#path weird
|
||||||
|
#open XXXX-XX-XX-XX-XX-XX
|
||||||
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p name addl notice peer source
|
||||||
|
#types time string addr port addr port string string bool string string
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 pop3_server_command_unknown - F zeek POP3
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 line_terminated_with_single_CR - F zeek CONTENTLINE
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 too_many_analyzer_violations - F zeek POP3
|
||||||
|
#close XXXX-XX-XX-XX-XX-XX
|
|
@ -0,0 +1,5 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
expression warning in <...>/count-underflow.zeek, line 22: count underflow (1 - 2)
|
||||||
|
expression warning in <...>/count-underflow.zeek, line 14: count underflow (0 - 1)
|
||||||
|
expression warning in <...>/count-underflow.zeek, line 18: count underflow (0 - 1)
|
||||||
|
warning: <...>/count-underflow.zeek, line 10: count underflow
|
8
testing/btest/Baseline.zam/language.count-underflow/out
Normal file
8
testing/btest/Baseline.zam/language.count-underflow/out
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
local c1 = 0; --c1; c1 == 18446744073709551615; T
|
||||||
|
local c2 = 0; c2 -= 1; c2 == 18446744073709551615; T
|
||||||
|
local c3 = 0; c3 = c3 - 1; c3 == 18446744073709551615; T
|
||||||
|
1 - 2, 18446744073709551615
|
||||||
|
local c4 = count_max; ++c4; c4 == 0; T
|
||||||
|
local c5 = count_max; c5 += 1; c5 == 0; T
|
||||||
|
local c6 = count_max; c6 = c6 + 1; c6 == 0; T
|
|
@ -2,3 +2,7 @@
|
||||||
[5.5, 5.2, -3.9, 20.0]
|
[5.5, 5.2, -3.9, 20.0]
|
||||||
[11, 5, , 107, , , 1046]
|
[11, 5, , 107, , , 1046]
|
||||||
[-2, -4, , -7, , -18, -999]
|
[-2, -4, , -7, , -18, -999]
|
||||||
|
[connT
|
||||||
|
ZAM-code connT , connF
|
||||||
|
ZAM-code connF , connMaybe
|
||||||
|
ZAM-code connMaybe ]
|
||||||
|
|
|
@ -8,14 +8,15 @@ analyzer_confirmation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, The National Center
|
foo_piece, FCceqBvpMfirSN0Ri, The National Center
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, net, consult your lo
|
foo_piece, FCceqBvpMfirSN0Ri, net, consult your lo
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, most everything else
|
foo_piece, FCceqBvpMfirSN0Ri, most everything else
|
||||||
|
analyzer_violation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri, test violation 3, most everything
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, low:\x0a\x0a /Mac
|
foo_piece, FCceqBvpMfirSN0Ri, low:\x0a\x0a /Mac
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, es and directories o
|
foo_piece, FCceqBvpMfirSN0Ri, es and directories o
|
||||||
analyzer_violation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri, test violation 5, es and directori
|
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, r example, here is a
|
foo_piece, FCceqBvpMfirSN0Ri, r example, here is a
|
||||||
|
analyzer_violation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri, test violation 6, r example, here
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, application, StuffIt
|
foo_piece, FCceqBvpMfirSN0Ri, application, StuffIt
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, tion BinHex by doubl
|
foo_piece, FCceqBvpMfirSN0Ri, tion BinHex by doubl
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, laced, or are going
|
foo_piece, FCceqBvpMfirSN0Ri, laced, or are going
|
||||||
|
analyzer_violation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri, test violation 9, laced, or are go
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, sers several documen
|
foo_piece, FCceqBvpMfirSN0Ri, sers several documen
|
||||||
analyzer_violation_info, AllAnalyzers::FILES_ANALYZER_FOO, FCceqBvpMfirSN0Ri, test violation 10, sers several doc
|
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, er or can be printed
|
foo_piece, FCceqBvpMfirSN0Ri, er or can be printed
|
||||||
foo_piece, FCceqBvpMfirSN0Ri, \x0a\x0aBug reports shoul
|
foo_piece, FCceqBvpMfirSN0Ri, \x0a\x0aBug reports shoul
|
||||||
|
|
11
testing/btest/Baseline.zam/plugins.file/weird.log
Normal file
11
testing/btest/Baseline.zam/plugins.file/weird.log
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
#separator \x09
|
||||||
|
#set_separator ,
|
||||||
|
#empty_field (empty)
|
||||||
|
#unset_field -
|
||||||
|
#path weird
|
||||||
|
#open XXXX-XX-XX-XX-XX-XX
|
||||||
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p name addl notice peer source
|
||||||
|
#types time string addr port addr port string string bool string string
|
||||||
|
XXXXXXXXXX.XXXXXX - - - - - too_many_analyzer_violations FCceqBvpMfirSN0Ri F zeek FOO
|
||||||
|
#close XXXX-XX-XX-XX-XX-XX
|
Loading…
Add table
Add a link
Reference in a new issue