logo       

malloc(0) fails in u9fs: msg#00600

os.plan9.general

Subject: malloc(0) fails in u9fs

I run u9fs on Tru64 UNIX but it gives `malloc(0) fails'.
I added the following fragment in emalloc() in u9fs.c.
I agree it could be an extremely nasty work-around.

/sys/src/cmd/unix/u9fs/u9fs.c:/^emalloc
void *p;

> if (n == 0)
> n = 1;
p = malloc(n);
if(p == 0)


(I used bundled CC, not GCC.)
--
YAMANASHI Takeshi




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise