A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sebastienros/jint/issues/587 below:

Engine.Execute throws OutOfMemoryException after 45s (even with the 2s timeout) · Issue #587 · sebastienros/jint · GitHub

The following program runs for about 45s (even though I've set the timeout interval to 2s) before finally throwing the OutOfMemoryException. You have to run in on .NET Framework 4.7.2 to reproduce it (this code hangs permanently on .NET Core, which I think is due to an issue in .NET Core itself).

using System;

namespace Jint.Run
{
  public class Program
  {
    public static void Main(string[] args)
    {
      new Engine(SetOptions).Execute("'x'.match(/|/g);");
    }

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

Here are the exception details:

System.OutOfMemoryException
  HResult=0x8007000E
  Message=Array dimensions exceeded supported range.
  Source=mscorlib
  StackTrace:
   at System.Collections.Generic.Dictionary`2.Resize(Int32 newSize, Boolean forceNewHashCodes)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Jint.Native.String.StringPrototype.Match(JsValue thisObj, JsValue[] arguments)
   at Jint.Runtime.Interop.ClrFunctionInstance.Call(JsValue thisObject, JsValue[] arguments)
   at Jint.Runtime.ExpressionInterpreter.EvaluateCallExpression(CallExpression callExpression)
   at Jint.Engine.ExecuteStatement(Statement statement)
   at Jint.Runtime.StatementInterpreter.ExecuteSingleStatement(Statement s)
   at Jint.Engine.Execute(Program program)

Found via SharpFuzz.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4