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.