crash with default in record in record


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]

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

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.


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.