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
{{ message }}
Repository navigation
Investigate OutOfMemory Exception happening woth Regex.Match for some patterns in the interpreted engine. #63385
There are some Regex pattern and input pairs that can trigger an OOM Exception with the Interpreted engine only. The issue seems to be that these crafted inputs are causing the interpreted engine to fail to exit out from a loop and increment the size of runstack array on RegexRunner until eventually an OOM happens. This doesn’t repro on the Compiled, NonBacktracking or source generated engines.
One example pattern that can be problematic is (|)+?$ which can repro with pretty much all non empty inputs, for example 11.
This issue is to track the investigation and resolution of this issue.
You are right, that pattern does repro in both 7.0 and 6.0. Given this is not a regression from 6 and the limited time we have for 7.0, I'm adjusting the milestone.
Activity
joperezr commentedon Jul 20, 2022
I just tried this out in preview 7 and I can't seem to be able to reproduce the issue any longer, so I'll go ahead close this for now.
stephentoub commentedon Jul 21, 2022
I can't repro it even on .NET 6. Are we sure the cited pattern / input are the right ones?
stephentoub commentedon Jul 21, 2022
I believe this is still an issue. Try:
joperezr commentedon Aug 8, 2022
You are right, that pattern does repro in both 7.0 and 6.0. Given this is not a regression from 6 and the limited time we have for 7.0, I'm adjusting the milestone.
Fix longstanding regex interpreter bug around lazy loops with empty m…