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 serhiy.storchaka, vstinner, xdegaye
Date 2017-06-19.12:31:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The main difference between your change and pyfailmalloc is the ability in pyfailmalloc to only fail in N allocations. If you want to test various code paths, you need to allow N allocations to reach the deep code that you want to test.

My code is something like 100 lines of C code.

IMHO it's small enough to fit directly into _testcapi.

The question is more what do you want to do with it? It was proposed to "include" pyfailmalloc directly in the Python test suite. Maybe add an option to enable it?

I ran the Python test suite with pyfailmalloc in gdb using this script:

./python -m test -F -r -v -x test_tracemalloc

I waited for the next *crash* and ignored all expected tests failing with MemoryError. --forever (-F) is nice to run random tests until you get a crash.
Date User Action Args
2017-06-19 12:31:59vstinnersetrecipients: + vstinner, xdegaye, serhiy.storchaka
2017-06-19 12:31:59vstinnersetmessageid: <>
2017-06-19 12:31:59vstinnerlinkissue30695 messages
2017-06-19 12:31:59vstinnercreate