Skip to content

espressif: re runs out of stack #6404

@dhalbert

Description

@dhalbert

The stack size on ESP32-xx may be too small. This code gets a stack overflow on an ESP32-S2 board running 7.2.5

>>> import re
>>> _REQUEST_RE = re.compile(r"(\S+)\s+(\S+)\s")
>>> _REQUEST_RE.match("GET /" + ("a" * 135) + " whatev")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded
>>> _REQUEST_RE.match("GET /" + ("a" * 134) + " whatev")
<match num=3>

(originally noted in adafruit/Adafruit_CircuitPython_HTTPServer#3)

I tried this on an nRF52840 without difficulty.

Metadata

Metadata

Assignees

Labels

espressifapplies to multiple Espressif chips

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions