You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
{publicclassProgram{publicstaticvoidMain(string[]args){new Engine(SetOptions).Execute("'x'.match(/|/g);");}privatestaticvoidSetOptions(Optionsoptions){
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)
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).
Here are the exception details:
Found via SharpFuzz.
The text was updated successfully, but these errors were encountered: