Overview
| Comment: | Use the real stack limit of the current thread (new TclpGetCStackLimit(): pthread_getattr_np, pthread_attr_get_np, pthread_get_stackaddr_np, pthread_stackseg_np, thr_stksegment, VirtualQuery) in the regexp stack check, capped at REG_MAX_STACK_DEPTH, so that threads with small stacks are protected too. Compute it only when first needed. New test stack-4.1 runs deep REs with a 256 KB stack. |
|---|---|
| Timelines: | family | ancestors | descendants | both | regexp-stack-depth |
| Files: | files | file ages | folders |
| SHA3-256: |
c9dd03125b16d464740e57387bc458c1 |
| User & Date: | serhiy.storchaka on 2026-10-11 10:04:21.156 |
| Other Links: | branch diff | manifest | tags |
Context
|
2026-10-16
| ||
| 12:15 | Fix [7d47ba7d94]: the regexp engine could overflow the C stack on deeply nested REs. Rebase to trunk closed check-in: 3de02ad5e8 user: jan.nijtmans tags: regexp-stack-depth | |
|
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 | |
Changes
Modified generic/regcomp.c
from [684f6c0070]
to [b8f2e3c03b].
[diff]
Modified generic/regexec.c
from [9292a903ee]
to [0a7063c25e].
[diff]
Modified generic/regguts.h
from [fed89fde46]
to [b107d8a391].
[diff]
Modified generic/tclInt.h
from [397e1d70c4]
to [e1b6480623].
[diff]
Modified tests/stack.test
from [f80adb879a]
to [e7bb3b534c].
[diff]
Modified unix/tclUnixThrd.c
from [ece8f2904f]
to [0423ab8eeb].
[diff]
Modified win/tclWinThrd.c
from [03deb855c9]
to [0e5873960f].
[diff]