Add co-op termination regression test for infinite recursive manual call on event function.

Such code would normally terminate quickly with a stack overflow exception anyway.
user_profiles
Justin Clark-Casey (justincc) 2013-01-22 02:32:40 +00:00
parent 0727784186
commit 9a4914e58c
1 changed files with 22 additions and 0 deletions

View File

@ -294,6 +294,28 @@ default
TestStop(script); TestStop(script);
} }
[Test]
public void TestStopOnInfiniteManualEventCallLoop()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
string script =
@"default
{
state_entry()
{
integer i = 0;
llSay(0, ""Thin Lizzy"");
llSay(0, ""Iter"" + (string)i++);
default_event_state_entry();
}
}";
TestStop(script);
}
private void TestStop(string script) private void TestStop(string script)
{ {
UUID userId = TestHelpers.ParseTail(0x1); UUID userId = TestHelpers.ParseTail(0x1);