oasis-open / cti-pattern-validator

OASIS TC Open Repository: Validate patterns used to express cyber observable content in STIX Indicators
https://stix2-patterns.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 23 forks source link

maximum recursion depth exceeded while calling a Python object #73

Open jaysneg opened 4 years ago

jaysneg commented 4 years ago

if pattern string contains more then 500 items it fails with RecursionError

if hasattr(listener, "enterObservationExpressionOr"):

RecursionError: maximum recursion depth exceeded while calling a Python object

delliott90 commented 4 years ago

We ran into a similar problem with one of our projects. I think it's a limitation of Antlr and Python. We solved the problem but increasing the recursion limit. The original issue related to Antlr can be found at https://github.com/antlr/antlr4/issues/984