bpo-47256: re module, limit the maximum capturing group to 1,073,741,823, increasing the depth of backtracking.#32411
Conversation
|
I would like to remove the variable |
Sorry, something went wrong.
Do it. |
Sorry, something went wrong.
These types are kept as Py_ssize_t: - PatternObject.groups - MatchObject.lastindex - MatchObject.groups - On 32 bit platform: 36 bytes, no change. (msvc2022) - On 64 bit platform: 72 bytes -> 64 bytes. (msvc2022/gcc9.4)
change the type of `SRE(match_context).jump` from Py_ssize_t to int - On 32 bit platform: 36 bytes, no change. (msvc2022) - On 64 bit platform: 64 bytes -> 56 bytes. (msvc2022/gcc9.4) And make the order of `DO_JUMPX` macro and `SRE(match_context)` struct consistent.
DATA_STACK_(PUSH|POP) macros use the size multiple time, now computed value is propagated.
|
Improved as your comments locally. |
Sorry, something went wrong.
|
I have no other comments. Please update this PR. |
Sorry, something went wrong.
I mean reviewer... |
Sorry, something went wrong.
Closes #91412.