mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00

Also removed RefExpr::Eval(Val*) method since it was never called (Clang emitted warning about this hiding overloaded virtual function UnaryExpr::Eval(Frame*)) and doesn't appear to be necessary even if it was called to avoid the default vector handling of UnaryExpr::Eval (as the comment suggests as the intention).
35 lines
561 B
Text
35 lines
561 B
Text
# Needs perftools support.
|
|
#
|
|
# @TEST-REQUIRES: bro --help 2>&1 | grep -q mem-leaks
|
|
#
|
|
# @TEST-GROUP: leaks
|
|
#
|
|
# @TEST-EXEC: HEAP_CHECK_DUMP_DIRECTORY=. HEAPCHECK=local bro -b -m -r $TRACES/chksums/ip4-udp-good-chksum.pcap %INPUT
|
|
|
|
type rec: record {
|
|
a: count;
|
|
b: string;
|
|
c: vector of count;
|
|
};
|
|
|
|
global vec: vector of count = vector(0,0,0);
|
|
|
|
global v: rec = [$a=0, $b="test", $c=vector(1,2,3)];
|
|
|
|
event new_connection(c: connection)
|
|
{
|
|
print vec;
|
|
print v;
|
|
|
|
++vec;
|
|
|
|
print vec;
|
|
|
|
++v$a;
|
|
|
|
print v;
|
|
|
|
++v$c;
|
|
|
|
print v;
|
|
}
|