Skip to content

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

@Metalnem

Description

@Metalnem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions