zeek/testing/btest/Baseline/core.leaks.broker.data/zeek..stdout
Jon Siwek 399496efa8 Merge remote-tracking branch 'origin/topic/johanna/remove-serializer'
* origin/topic/johanna/remove-serializer:
  Fix memory leak introduced by removing opaque of ocsp_resp.
  Change return value of OpaqueVal::DoSerialize.
  Add missing ShallowClone implementation for SetType
  Remove opaque of ocsp_resp.
  Remove remnants of event serializer.
  Fix cardinalitycounter deserialization.
  Smaller compile fixes for the new opaque serialization.
  Reimplement serialization infrastructure for OpaqueVals.
  Couple of compile fixes.
  Remove const from ShallowClone.
  Remove test-case for removed functionality
  Implement a Shallow Clone operation for types.
  Remove value serialization.

Various changes I made:

- Fix memory leak in type-checker for opaque vals wrapped in broker::data

- Noticed the two "copy-all" leak tests weren't actually checking for
  memory leaks because the heap checker isn't active until after zeek_init()
  is evaluated.

- Change OpaqueVal::DoClone to use the clone caching mechanism

- Improve copy elision for broker::expected return types in the various
  OpaqueVal serialize methods

  - Not all compilers end up properly treating the return of
    local/automatic variable as an rvalue that can be moved, and ends up
    copying it instead.

  - Particularly, until GCC 8, this pattern ends up copying instead of
    moving, and we still support platforms whose default compiler
    pre-dates that version.

  - Generally seems it's something that wasn't addressed until C++14.
    See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579

- Change OpaqueVal::SerializeType to return broker::expected

- Change probabilistic DoSerialize methods to return broker::expected
2019-06-20 13:38:54 -07:00

120 lines
1.1 KiB
Text

Broker::BOOL
Broker::INT
Broker::COUNT
Broker::DOUBLE
Broker::STRING
Broker::ADDR
Broker::SUBNET
Broker::PORT
Broker::TIME
Broker::INTERVAL
Broker::ENUM
Broker::SET
Broker::TABLE
Broker::VECTOR
Broker::VECTOR
***************************
T
F
1
0
-1
1
0
1.1
-11.1
hello
1.2.3.4
192.168.0.0/16
22/tcp
42.0
180.0
Broker::BOOL
{
two,
one,
three
}
{
[two] = 2,
[one] = 1,
[three] = 3
}
[zero, one, two]
[a=<uninitialized>, b=bee, c=1]
[a=test, b=bee, c=1]
[a=test, b=testagain, c=1]
***************************
0
T
1
T
F
T
2
F
2
T
1
F
{
bye
}
T
0
{
}
***************************
0
[data=<uninitialized>]
1
T
42
F
[data=<uninitialized>]
2
[data=broker::data{7}]
2
37
[data=broker::data{42}]
1
[data=<uninitialized>]
1
T
0
{
}
***************************
0
T
T
T
T
[hi, salutations, hello, greetings]
4
[data=broker::data{hello}]
[data=broker::data{bah}]
[data=broker::data{hi}]
[hi, salutations, bah, greetings]
[data=broker::data{bah}]
[hi, salutations, greetings]
3
T
0
[]
***************************
3
T
T
T
[data=broker::data{hi}]
[data=broker::data{hello}]
[data=broker::data{37}]
3
T
3
[data=broker::data{goodbye}]
***************************
T