Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.
Comments: Hello! This appears to be the same issue that was reported [here](https://clearscript.codeplex.com/discussions/658021). Please try ClearScript 5.4.8. If you're using a NuGet package that hasn't been updated, we recommend that you contact its owners or build ClearScript yourself using the procedure outlined in the [ReadMe](https://clearscript.codeplex.com/SourceControl/latest#ReadMe.txt). Thanks!

Viewing all articles
Browse latest Browse all 2297