mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/fix-enumtype-shallow-clone'
* origin/topic/jsiwek/fix-enumtype-shallow-clone: Fix ref-counting bug in EnumType copy ctor
This commit is contained in:
commit
a45cc53892
5 changed files with 22 additions and 1 deletions
7
CHANGES
7
CHANGES
|
@ -1,4 +1,11 @@
|
|||
|
||||
2.6-616 | 2019-07-16 15:21:37 +0000
|
||||
|
||||
* Fix referecne counting bug in EnumType copy constructor. (Jon
|
||||
Siwek, Corelight)
|
||||
|
||||
* Remove unused BroObj::in_ser_cache member. (Jon Siwek, Corelight)
|
||||
|
||||
2.6-612 | 2019-07-15 19:46:04 -0700
|
||||
|
||||
* Fix a potential usage of List::remove_nth(-1) (Jon Siwek, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.6-612
|
||||
2.6-616
|
||||
|
|
|
@ -1088,6 +1088,9 @@ EnumType::EnumType(const EnumType* e)
|
|||
names[it->first] = it->second;
|
||||
|
||||
vals = e->vals;
|
||||
|
||||
for ( auto& kv : vals )
|
||||
::Ref(kv.second);
|
||||
}
|
||||
|
||||
EnumType* EnumType::ShallowClone()
|
||||
|
|
1
testing/btest/Baseline/language.enum-multiple-decls/out
Normal file
1
testing/btest/Baseline/language.enum-multiple-decls/out
Normal file
|
@ -0,0 +1 @@
|
|||
ONE
|
10
testing/btest/language/enum-multiple-decls.zeek
Normal file
10
testing/btest/language/enum-multiple-decls.zeek
Normal file
|
@ -0,0 +1,10 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
# At the moment, it's legal to allow a double definitions. Internally, the
|
||||
# reason/comment is: "so that we can define an enum both in a *.bif and *.zeek
|
||||
# for avoiding cyclic dependencies."
|
||||
|
||||
type myenum: enum { ONE = 0x01 };
|
||||
type myenum: enum { ONE = 0x01 };
|
||||
print ONE;
|
Loading…
Add table
Add a link
Reference in a new issue