[Bro-Dev] [JIRA] (BIT-1233) Parameters inside dynamically instantiated functions bind incorrectly

Jon Siwek (JIRA) jira at bro-tracker.atlassian.net
Mon Aug 25 07:16:08 PDT 2014


     [ https://bro-tracker.atlassian.net/browse/BIT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Siwek updated BIT-1233:
---------------------------
    Fix Version/s: 2.4

> Parameters inside dynamically instantiated functions bind incorrectly
> ---------------------------------------------------------------------
>
>                 Key: BIT-1233
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1233
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: git/master
>            Reporter: Robin Sommer
>              Labels: language
>             Fix For: 2.4
>
>
> The example below should print "2 1", but prints "2 2". I'm not sure if we can actually fix that easily, but if not it should at least print an error message that binding to outer parameters isn't supported.
> {noformat}
> type Foo: record {
>         x: function(a: string) : string;
> };
> function bar(b: string)
>         {
>         local f: Foo;
>         f = [$x=function(a: string) : string
>                 {
>                 return cat(a, " ", b);
>                 }
>              ];
>         print f$x("2");
>         }
> event bro_init()
>         {
>         bar("1");
>         }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4-OD-04-006#64001)


More information about the bro-dev mailing list