This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients abacabadabacaba, ezio.melotti, mrabarnett, vstinner
Date 2015-03-17.17:09:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
There is maybe a bug. Can you show an example of regex and a text where the memory leak occurs? You can use the tracemalloc module to check if there is a memory leak. Or use sys.getcounts() if you compiled Python in debug mode.

sre_lib.h is very complex, it uses the C instruction "goto" with regex bytecodes.

"DO_JUMP(JUMP_REPEAT, jump_repeat, ctx->pattern+ctx->pattern[0]);" calls "goto entrace" to execute following bytecodes, but later it comes back after DO_JUMP() with the "jump_repeat:" label:

https://hg.python.org/cpython/file/c89f7c34e356/Modules/sre_lib.h#l1180
History
Date User Action Args
2015-03-17 17:09:24vstinnersetrecipients: + vstinner, ezio.melotti, mrabarnett, abacabadabacaba
2015-03-17 17:09:24vstinnersetmessageid: <[email protected]>
2015-03-17 17:09:24vstinnerlinkissue23689 messages
2015-03-17 17:09:24vstinnercreate