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 eryksun
Recipients eric.smith, eryksun, kunduruanil, paul.moore, steve.dower, tim.golden, vstinner, xtreak, zach.ware
Date 2019-01-16.11:40:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547638801.38.0.324980901949.issue35750@roundup.psfhosted.org>
In-reply-to
Content
A crash with the code STATUS_HEAP_CORRUPTION (0xC0000374) is due to a bug, not memory exhaustion. The bug may not be the fault of the interpreter or standard library if you're working with extension modules or ctypes. It's easy to corrupt the internal structures of a heap. For example:

    >>> import ctypes
    >>> b = (ctypes.c_char * 100000)()
    >>> ctypes.POINTER(ctypes.c_int)(b)[-1] = 0
    >>> del b

[crashed]

    C:\>echo %errorlevel%
    -1073740940

Heap corruption is best examined with a debugger (e.g. windbg or cdb) attached to the faulting process, with full page heap checking enabled for the executable in the registry (usually set via gflags). This reserves a page before and after each heap allocation to ensure that writes that would otherwise corrupt the heap will instead immediately raise an access violation.
History
Date User Action Args
2019-01-16 11:40:02eryksunsetrecipients: + eryksun, paul.moore, vstinner, eric.smith, tim.golden, zach.ware, steve.dower, xtreak, kunduruanil
2019-01-16 11:40:01eryksunsetmessageid: <1547638801.38.0.324980901949.issue35750@roundup.psfhosted.org>
2019-01-16 11:40:01eryksunlinkissue35750 messages
2019-01-16 11:40:01eryksuncreate