[WIP] bpo-23689: Memory leak in Modules/sre_lib.h · Pull Request #11926 · python/cpython · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Modules/_sre.c
4 changes: 2 additions & 2 deletions Modules/sre.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typedef struct SRE_REPEAT_T {
Py_ssize_t count;
SRE_CODE* pattern; /* points to REPEAT operator arguments */
void* last_ptr; /* helper to check for infinite loops */
struct SRE_REPEAT_T *prev; /* points to previous repeat context */
Py_ssize_t prev; /* points to previous repeat context in stack */
} SRE_REPEAT;

typedef struct {
Expand All @@ -82,7 +82,7 @@ typedef struct {
size_t data_stack_size;
size_t data_stack_base;
/* current repeat context */
SRE_REPEAT *repeat;
Py_ssize_t repeat;
} SRE_STATE;

typedef struct {
Expand Down
113 changes: 62 additions & 51 deletions Modules/sre_lib.h