Merge remote-tracking branch 'origin/topic/etyp/locals-to-global'

* origin/topic/etyp/locals-to-global:
  Do not export locals
This commit is contained in:
Tim Wojtulewicz 2025-02-14 11:28:48 -08:00
commit 9c41b6d227
5 changed files with 35 additions and 2 deletions

View file

@ -1,3 +1,9 @@
7.2.0-dev.199 | 2025-02-14 11:28:48 -0800
* Do not export locals (Evan Typanski, Corelight)
* DPD changes - ZAM baseline updates (Johanna Amann, Corelight)
7.2.0-dev.194 | 2025-02-07 07:31:26 +0000 7.2.0-dev.194 | 2025-02-07 07:31:26 +0000
* Allow to track service violations in conn.log. (Johanna Amann, Corelight) * Allow to track service violations in conn.log. (Johanna Amann, Corelight)

View file

@ -1 +1 @@
7.2.0-dev.194 7.2.0-dev.199

View file

@ -2212,7 +2212,7 @@ local_id:
else else
{ {
$$ = install_ID($1, current_module.c_str(), $$ = install_ID($1, current_module.c_str(),
false, is_export).release(); false, false).release();
} }
} }
; ;

View file

@ -0,0 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
one
two

View file

@ -0,0 +1,24 @@
# @TEST-DOC: Ensure that locals are not hoisted to global scope.
# @TEST-EXEC: zeek -b %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff .stdout
module Test;
export {
function func1()
{
local t: string = "one";
print t;
}
function func2()
{
local t: string = "two";
print t;
}
}
event zeek_init()
{
func1();
func2();
}