Skip to content

Investigate OutOfMemory Exception happening woth Regex.Match for some patterns in the interpreted engine. #63385

@joperezr

Description

@joperezr

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions