Skip to content
Tcl Source Code Check-in [ef6503421f]
Login

Check-in [ef6503421f]

Overview
Comment:Fix [7d47ba7d94]: the regexp engine could overflow the C stack on deeply nested REs. Implement STACK_TOO_DEEP() as a stack budget (REG_MAX_STACK_DEPTH, 1 MB) measured from compile()/exec(), add the checks PostgreSQL has, and cache lookahead DFAs per execution instead of building them on the stack. Deep nesting now fails with "regular expression is too complex". New tests reg-33.32 to 33.35, reg-33.14 made portable.
Timelines: family | ancestors | descendants | both | regexp-stack-depth
Files: files | file ages | folders
SHA3-256: ef6503421f59b2def1954fcddf9dd40ed2e37fec18630beb9e814986c544f0d2
User & Date: serhiy.storchaka on 2026-10-10 20:46:07.672
Other Links: branch diff | manifest | tags
Context
2026-10-11
10:04
Use the real stack limit of the current thread (new TclpGetCStackLimit(): pthread_getattr_np, pthrea... check-in: c9dd03125b user: serhiy.storchaka tags: regexp-stack-depth
2026-10-10
20:46
Fix [7d47ba7d94]: the regexp engine could overflow the C stack on deeply nested REs. Implement STACK... check-in: ef6503421f user: serhiy.storchaka tags: regexp-stack-depth
2026-10-08
09:29
merge: gahr-dual-stack-tests check-in: e55edf971f user: gahr tags: trunk, main
Changes