Feature #12359
closedWant a means to set the umem mtbf at runtine
100%
Description
libumem today has a private means of injecting failures into a program via the memory allocator. It would be great if we had a way to set this at run-time from a program so we can properly test the out of memory failure paths in various programs and routines without using allocator-specific kludges like trying to map right above the brk and eating up all of the memory, which would then make it harder to continue.
This adds a function umem_setmtbf
which allows one to update the already existing umem functionality.
Related issues
Updated by Robert Mustacchi over 3 years ago
I tested this by using the functionality in the test suite for the memory streams (7092) work. They all behaved as expected and memory allocations properly failed.
Updated by Robert Mustacchi over 3 years ago
- Related to Feature #7092: Want support for stdio memory streams added
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 1470234269f4edea4cbf270cb2475e4988b788d5
commit 1470234269f4edea4cbf270cb2475e4988b788d5 Author: Robert Mustacchi <rm@fingolfin.org> Date: 2020-03-26T07:42:53.000Z 12359 Want a means to set the umem mtbf at runtine Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Yuri Pankov <ypankov@fastmail.com> Approved by: Dan McDonald <danmcd@joyent.com>