bpo-47256: Increasing the depth of backtracking in RE (GH-32411)
Limit the maximum capturing group to 2**30-1 on 64-bit platforms (it was 2**31-1). No change on 32-bit platforms (2**28-1). It allows to reduce the size of SRE(match_context): - On 32 bit platform: 36 bytes, no change. (msvc2022) - On 64 bit platform: 72 bytes -> 56 bytes. (msvc2022/gcc9.4) which leads to increasing the depth of backtracking.
M
Ma Lin committed
a29f858124bc698f6604716b73306c65b63b5054
Parent: 1c2fceb
Committed by GitHub <noreply@github.com>
on 4/18/2022, 1:50:40 PM