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
ERROR: System.AggregateException: One or more errors occurred. (Attempted to divide by zero.)
---> System.DivideByZeroException: Attempted to divide by zero.
at Runner.Jobs.RegexDiffJob.<>c__DisplayClass10_2.<RunJitDiffAsync>b__6(Int32 i) in /home/runtime-utils/Runner/Jobs/RegexDiffJob.cs:line 564
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
at Runner.Jobs.RegexDiffJob.<>c__DisplayClass10_1.<<RunJitDiffAsync>b__5>d.MoveNext() in /home/runtime-utils/Runner/Jobs/RegexDiffJob.cs:line 562
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__49`1.<<ForAsync>b__49_2>d.MoveNext()
--- End of stack trace from previous location ---
at Runner.Jobs.RegexDiffJob.<>c__DisplayClass10_0.<<RunJitDiffAsync>g__GenerateRegexAssembliesAsync|1>d.MoveNext() in /home/runtime-utils/Runner/Jobs/RegexDiffJob.cs:line 543
--- End of stack trace from previous location ---
at Runner.Jobs.RegexDiffJob.RunJitDiffAsync(KnownPattern[] knownPatterns, RegexEntry[] entries) in /home/runtime-utils/Runner/Jobs/RegexDiffJob.cs:line 508
at Runner.Jobs.RegexDiffJob.RunJobCoreAsync() in /home/runtime-utils/Runner/Jobs/RegexDiffJob.cs:line 50
at Runner.JobBase.RunJobAsync() in /home/runtime-utils/Runner/JobBase.cs:line 116
Examples of GeneratedRegex source diffs
435 out of 18885 patterns have generated source code changes.
ReadOnlySpan<char> span = inputSpan.Slice(pos);
for (int i = 0; i < span.Length - 1; i++)
{
- int indexOfPos = span.Slice(i).IndexOfAny(Utilities.s_nonAscii_326E1FD0AD567A84CAD13F2BE521A57789829F59D59ABE37F9E111D0182B6601);+ int indexOfPos = span.Slice(i).IndexOfAny(Utilities.s_asciiLettersAndKelvinSign);
if (indexOfPos < 0)
{
goto NoMatchFound;
//{
charloop_starting_pos1 = pos;
- int iteration1 = slice.IndexOfAnyExcept(Utilities.s_nonAscii_326E1FD0AD567A84CAD13F2BE521A57789829F59D59ABE37F9E111D0182B6601);+ int iteration1 = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndKelvinSign);
if (iteration1 < 0)
{
iteration1 = slice.Length;
// Match a character in the set [A-Za-z\u212A] atomically at least once.
{
- int iteration2 = slice.IndexOfAnyExcept(Utilities.s_nonAscii_326E1FD0AD567A84CAD13F2BE521A57789829F59D59ABE37F9E111D0182B6601);+ int iteration2 = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndKelvinSign);
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
/// <summary>Supports searching for characters in or not in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_326E1FD0AD567A84CAD13F2BE521A57789829F59D59ABE37F9E111D0182B6601 = SearchValues.Create("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndKelvinSign = SearchValues.Create("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");
}
}
// Match a character in the set [0-9A-Z_a-z\u212A] atomically at least once.
{
- int iteration = slice.IndexOfAnyExcept(Utilities.s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386);+ int iteration = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndUnderscoreKelvinSign);
if (iteration < 0)
{
iteration = slice.Length;
/// <summary>Whether <see cref="s_defaultTimeout"/> is non-infinite.</summary>
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
+ /// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK".</summary>+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndUnderscoreKelvinSign = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");+
/// <summary>Supports searching for the string "{=".</summary>
internal static readonly SearchValues<string> s_indexOfString_FF8EFDA40535CF1F37189CED2FF42AF44018C0053133E1D75453EFBFBDB644FD = SearchValues.Create(["{="], StringComparison.Ordinal);
-- /// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK".</summary>- internal static readonly SearchValues<char> s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386 = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");
}
}
// Match a character in the set [0-9A-Z_a-z\u212A] atomically any number of times.
{
- int iteration = slice.Slice(1).IndexOfAnyExcept(Utilities.s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386);+ int iteration = slice.Slice(1).IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndUnderscoreKelvinSign);
if (iteration < 0)
{
iteration = slice.Length - 1;
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
/// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386 = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndUnderscoreKelvinSign = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");
}
}
slice = inputSpan.Slice(pos);
charloop_starting_pos = pos;
- int iteration = slice.IndexOfAnyExcept(Utilities.s_nonAscii_83AFA3CC45CC4C2D8C316947CFC319199813C7F90226BDF348E2B3236D6237C1);+ int iteration = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndDashDotKelvinSign);
if (iteration < 0)
{
iteration = slice.Length;
slice = inputSpan.Slice(pos);
charloop_starting_pos1 = pos;
- int iteration1 = slice.IndexOfAnyExcept(Utilities.s_nonAscii_46E3FAA2E94950B9D41E9AB1B570CAB55D04A30009110072B4BC074D57272527);+ int iteration1 = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndKelvinSign);
if (iteration1 < 0)
{
iteration1 = slice.Length;
// Match a character in the set [-.0-9A-Z_a-z\u212A] atomically any number of times.
{
- int iteration2 = slice.Slice(1).IndexOfAnyExcept(Utilities.s_nonAscii_0D7E5600013B3F0349C00277028B6DEA566BB9BAF991CCB7AC92DEC54C4544C1);+ int iteration2 = slice.Slice(1).IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndDashDotUnderscoreKelvinSign);
if (iteration2 < 0)
{
iteration2 = slice.Length - 1;
}
}
+ /// <summary>Supports searching for characters in or not in "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK".</summary>+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndDashDotKelvinSign = SearchValues.Create("-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");+
/// <summary>Supports searching for characters in or not in "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_0D7E5600013B3F0349C00277028B6DEA566BB9BAF991CCB7AC92DEC54C4544C1 = SearchValues.Create("-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndDashDotUnderscoreKelvinSign = SearchValues.Create("-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");
/// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_46E3FAA2E94950B9D41E9AB1B570CAB55D04A30009110072B4BC074D57272527 = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");-- /// <summary>Supports searching for characters in or not in "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK".</summary>- internal static readonly SearchValues<char> s_nonAscii_83AFA3CC45CC4C2D8C316947CFC319199813C7F90226BDF348E2B3236D6237C1 = SearchValues.Create("-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndKelvinSign = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");
}
}
{
// The pattern begins with a character in the set [^0-9A-Z_a-z\u212A].
// Find the next occurrence. If it can't be found, there's no match.
- int i = inputSpan.Slice(pos).IndexOfAnyExcept(Utilities.s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386);+ int i = inputSpan.Slice(pos).IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndUnderscoreKelvinSign);
if (i >= 0)
{
base.runtextpos = pos + i;
// Match a character in the set [^0-9A-Z_a-z\u212A] atomically at least once.
{
- int iteration = slice.IndexOfAny(Utilities.s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386);+ int iteration = slice.IndexOfAny(Utilities.s_asciiLettersAndDigitsAndUnderscoreKelvinSign);
if (iteration < 0)
{
iteration = slice.Length;
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
/// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_9FA52D3BAECB644578472387D5284CC6F36F408FEB88A04BA674CE14F24D2386 = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndUnderscoreKelvinSign = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzK");
}
}
// Match a character in the set [0-9A-Za-z\u212A] atomically at least once.
{
- int iteration = slice.IndexOfAnyExcept(Utilities.s_nonAscii_46E3FAA2E94950B9D41E9AB1B570CAB55D04A30009110072B4BC074D57272527);+ int iteration = slice.IndexOfAnyExcept(Utilities.s_asciiLettersAndDigitsAndKelvinSign);
if (iteration < 0)
{
iteration = slice.Length;
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
/// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK".</summary>
- internal static readonly SearchValues<char> s_nonAscii_46E3FAA2E94950B9D41E9AB1B570CAB55D04A30009110072B4BC074D57272527 = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");+ internal static readonly SearchValues<char> s_asciiLettersAndDigitsAndKelvinSign = SearchValues.Create("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzK");
}
}
conststringJsonPath="RegexResults-623.json";if(!File.Exists(JsonPath)){awaitusingvararchiveStream=awaitnewHttpClient().GetStreamAsync("https://runtimeutils.blob.core.windows.net/artifacts/EcdMNPUAAAE/Results.zip");usingvararchive=newZipArchive(archiveStream,ZipArchiveMode.Read);archive.Entries.First(e =>e.Name=="Results.json").ExtractToFile(JsonPath);}usingFileStreamjsonFileStream=File.OpenRead(JsonPath);RegexEntry[]entries=JsonSerializer.Deserialize<RegexEntry[]>(jsonFileStream)!;Console.WriteLine($"Working with {entries.Length} patterns");recordKnownPattern(stringPattern,RegexOptionsOptions,intCount);sealedclassRegexEntry{publicrequiredKnownPatternRegex{get;set;}publicrequiredstringMainSource{get;set;}publicrequiredstringPrSource{get;set;}publicstring?FullDiff{get;set;}publicstring?ShortDiff{get;set;}public(stringName,stringValues)[]?SearchValuesOfChar{get;set;}public(string[]Values,StringComparisonComparisonType)[]?SearchValuesOfString{get;set;}}
Job completed in 19 minutes 15 seconds.
Using arguments:
regexdiff -NoPRLink
Examples of GeneratedRegex source diffs
435 out of 18885 patterns have generated source code changes.
"\\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z ..." (5703 uses)
"(?<lang>[a-z]{2,8})(?:(?:\\-(?<script>[a-zA- ..." (5593 uses)
"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25 ..." (1964 uses)
"^(?<Version>\\d+(\\s*\\.\\s*\\d+){0,3})(?<Re ..." (1737 uses)
"(?<![a-z0-9_])\\{=([a-z0-9_]+)\\}" (1405 uses)
"\\?([a-z_][a-z0-9_]*)\\?" (1405 uses)
"^(http|https)\\://[a-zA-Z0-9\\-\\.]+(:[a-zA- ..." (821 uses)
"[^a-z0-9_]+" (814 uses)
"^[a-zA-Z0-9]+$" (790 uses)
"^(?<Version>\\d+(\\s*\\.\\s*\\d+){0,3})(?<Re ..." (704 uses)
For more diff examples, see https://gist.github.com/MihuBot/efd39f22237c922e7f5b5793b45dc531
Sample source code for further analysis
Artifacts:
The text was updated successfully, but these errors were encountered: