[Bro-Dev] #367: internal_error with &optional fields in records used as indexes

Bro Tracker bro at tracker.icir.org
Wed Jan 26 13:44:41 PST 2011


#367: internal_error with &optional fields in records used as indexes
---------------------+------------------------
 Reporter:  seth     |      Owner:
     Type:  Problem  |     Status:  new
 Priority:  Normal   |  Milestone:  Bro1.6
Component:  Bro      |    Version:  git/master
 Keywords:           |
---------------------+------------------------
 Trying to add records with optional fields to tables or sets as the index
 fails (doesn't crash though) if one of the optional fields does not have a
 value.

 This script will cause the error:

 {{{
 type FOO: record {
         a: count;
         b: count &optional;
 };

 event bro_init()
         {
         local set_of_foo: set[FOO] = set();

         add set_of_foo[[$a=3]];
         print set_of_foo;
         }
 }}}

 {{{
 $ ./src/bro test-367.bro
 1296078003.394335 <no location> and ./test-367.bro, line 11
    ([a=3, b=<uninitialized>] and list of record { a:count; b:count; }):
 error, index type doesn't match table
 {

 }
 }}}

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



More information about the bro-dev mailing list