[Bro-Dev] #980: elements not added to set as expected when using &default

Bro Tracker bro at tracker.bro.org
Wed Apr 17 15:58:51 PDT 2013


#980: elements not added to set as expected when using &default
------------------------+---------------------
 Reporter:  dmandelb    |       Type:  Problem
   Status:  new         |   Priority:  Low
Milestone:  Bro2.2      |  Component:  Bro
  Version:  git/master  |   Keywords:
------------------------+---------------------
 This code

 {{{
 type Foo: record {
         x: count &default=0;
 };

 global foo: table[count] of Foo = {} &default=[];

 print(foo);
 print(foo[0]$x);
 foo[0]$x += 42;
 print(foo);
 print(foo[0]$x);
 }}}

 prints

 {{{
 {

 }
 0
 {

 }
 42
 }}}

 but I think it should instead print

 {{{
 {

 }
 0
 {
 [0] = [x=42]
 }
 42
 }}}

-- 
Ticket URL: <http://tracker.bro.org/bro/ticket/980>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list