Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine.Execute takes more than two minutes to complete (even with the 2s timeout) #586

Closed
Metalnem opened this issue Jan 20, 2019 · 1 comment
Labels

Comments

@Metalnem
Copy link

The following program runs for more than two minutes on my machine, even though I've set the timeout interval to two seconds. I'm using .NET Core 2.2 on macOS, but the same thing happens on Linux, too.

using System;

namespace Jint.Run
{
  public class Program
  {
    public static void Main(string[] args)
    {
      new Engine(SetOptions).Execute("new Date (1,  Infinity);");
    }

    private static void SetOptions(Options options)
    {
      options.LimitRecursion(32).TimeoutInterval(TimeSpan.FromSeconds(2));
    }
  }
}

Found via SharpFuzz.

@lahma
Copy link
Collaborator

lahma commented May 25, 2019

Thanks for reporting this, fixed via #627

@lahma lahma closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants