[Toybox] [PATCH] Don't use xfdopen
Rob Landley
rob at landley.net
Wed Aug 7 10:22:57 PDT 2013
On 08/04/2013 07:30:00 PM, idunham at lavabit.com wrote:
> grep in hg tip won't build without this patch.
> xfdopen is not needed (we already have the file open, and we wouldn't
> want to die early if by some peculiar chance that were irrelevant).
fdopen() failing is basically malloc() failing. I.E. this is a malloc
vs xmalloc case. If malloc ever _does_ return 0, the system is so hosed
there's no recovery possible. (Either your heap is corrupted or you've
exhausted _virtual_ address space before exhausting _physical_ address
space and most likely the OOM killer cometh, or sudden deadlock on
systems that disable OOM. Or you're using the crazy pointy-hair
overcommit accounting stuff and thus you've essentially _asked_ the
program to die, so oblige. Or it could be nommu. In any case, don't try
to proceed; it won't end well.)
That said: oops, didn't check it in. :)
Rob
1375896177.0
More information about the Toybox
mailing list