[Bro] Inaccurate line number in error message

Christian Kreibich christian at whoop.org
Sun Jun 19 17:39:54 PDT 2005


when running the following policy snippet below, one gets the error
message "line 1 (i): error, not a BRO type".

1  function foo(i: int)
2  {
3          # ...
4          local j: i;
5  }

However, there is no error in line 1. It's in line 4, which should be "j
= i" instead. I just had a more complicated scenario with basically this
error and it took me ages to locate the problem. I kept looking in the
wrong spot because my line "4" was much further down in a biggish

After looking at parse.y for a while I conclude that I don't really know
the right way to fix this -- could anyone provide pointers, or better
yet, a patch? Thanks!


More information about the Bro mailing list