[Bro-Dev] #936: topic/jsiwek/record-coerce-orphans

Bro Tracker bro at tracker.bro-ids.org
Thu Jan 24 08:09:12 PST 2013


#936: topic/jsiwek/record-coerce-orphans
---------------------------+------------------------
 Reporter:  jsiwek         |      Owner:
     Type:  Merge Request  |     Status:  new
 Priority:  Normal         |  Milestone:  Bro2.2
Component:  Bro            |    Version:  git/master
 Keywords:                 |
---------------------------+------------------------
 This branch makes it an error for a record field to be orphaned on
 coercion.  E.g:

 {{{
 type myrec: record {
     a: string;
     b: count;
     c: interval &optional;
 };

 local rec: myrec = [$a="test", $b=42, $wtf=1sec];
 }}}

 I think it's helpful because a typo of a field name (e.g. "identifer"
 versus "identifier") can be hard to spot, but result in unexpected runtime
 behavior (e.g. I spent time looking for a non-existent regression in
 notice de-duplication, when actually I just made a typo).

 Though, I don't know if there was a reason originally for allowing fields
 to be orphaned?  At least all tests can be made to pass with the change.

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



More information about the bro-dev mailing list