[Bro-Dev] #923: Parse Error Missing in Record/Type Confusion

Bro Tracker bro at tracker.bro-ids.org
Thu Dec 13 20:16:36 PST 2012


#923: Parse Error Missing in Record/Type Confusion
------------------------+---------------------
 Reporter:  grigorescu  |       Type:  Problem
   Status:  new         |   Priority:  Normal
Milestone:  Bro2.2      |  Component:  Bro
  Version:  git/master  |   Keywords:
------------------------+---------------------
 The following code:

 {{{
 type test_record: record { my_string: string; };

 function test(s: test_record) { print test_record$my_string; }

 event bro_init() { test([$my_string="Hello"]); }
 }}}

 causes a reporter error: {{{fatal error in <no location>: Val::CONVERTER
 (type/record) (<no value description>)}}}. Note that function test is
 attempting to access test_record$my_string (where test_record is a type)
 as opposed to s$my_string (where s is an instance of test_record).

 This is a message that I've seen before, and had a very hard time
 debugging. It seems like this should generate a parse error, or at the
 very least, report the location.

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



More information about the bro-dev mailing list