polserver/testsuite/pol/testpkgs/item/method.src
turleypol 37c2fb0299
Method function crash (#477)
* Crash reproducer with methods

* potential crash fix

* removed ASan build, added core changes

* do not store valuestack reference before calling method to fix potential
dangling reference

* Take into account that the ValueStack can grow due to method calls.
2022-10-16 19:39:25 +02:00

19 lines
273 B
Text

program MethodTest()
return 1;
endprogram
exported function Outer(item)
item.InnerCrash();
endfunction
exported function InnerCrash(item)
var foo := "bar";
endfunction
exported function Outer2(item)
var i:=1;
item.InnerCrash();
++i;
return i;
endfunction