ScriptEngine.ExecuteFile sometimes hangs permanently instead of throwing JavaScriptException when encountering syntactically invalid JavaScript code. Here is the full program that reproduces such behavior:
namespace Jurassic.Run
{
public class Program
{
public static void Main(string[] args)
{
new ScriptEngine().Execute("for(a=0;a<2;a++[1])1");
}
}
}
Chrome and Safari display the following error when running this JavaScript snippet:
SyntaxError: Unexpected token '['.
Found via SharpFuzz.