crash with default in record in record

Hi,

When I have a default value in one record that's inside of another
record, I get a crash trying to print that value. I've attached source
code that reliably crashes for me along with a log of what I see when it
crashes. The output I'm expecting is:

[bar=4321, foo=[foo=1234, quux=9876]]
[foo=1234, quux=9876]
9876

Has anybody seen this before? Am I trying to do something that's not
supported?

P.S. What I really want is something like "foo: Foo
&default=[$foo=bar];" so that bar$foo$foo defaults to the same value as
bar$bar. Is that possible?

crash.bro (213 Bytes)

crash.log (4.98 KB)

I've never seen anyone do that before, but your code should just be rejected at parse time anyway. Feel free to file a ticket related to this, we can at least discuss your sample script in the tracker.

  .Seth

Actually ignore that comment about the code being rejected. I read it wrong the first time and apparently I didn't finish correcting my response. The code seems reasonable.

  .Seth