[Python-Dev] Py2.4 _sre uses uninitialised memory (Bug 1088891)

Andrew McNamara andrewm at object-craft.com.au
Tue Dec 21 09:21:44 CET 2004

_sre.c, data_stack_grow() in Py2.4 uses realloc()'ed memory without
initialising the newly allocated memory. For complex regexps that require
additional sre stack space, this ultimately results in a core dump or
corrupted heap. Filling the newly allocated memory with 0x55 makes the
problem more obvious (dies on a reference to 0x55555558) for me.

See bug ID 1088891:


Can I be the only person who crafts diabolical regexps? Here, have a
lend of my brown paper bag...

Andrew McNamara, Senior Developer, Object Craft

More information about the Python-Dev mailing list