bug in arc with fix
Stu Heiss
stu at jpusa1.UUCP
Fri Oct 10 17:52:04 AEST 1986
Oops!!! Got this back from Steve Spearman (ihnp4!ihlpf!spear)...
> There is a serious bug I thought
>you would be interested in though. In arcunix.c, the xrealloc routine
>calls it self recursively forever because of the #define of realloc
>to xrealloc. This causes, for example, any command with more than
>one file name to fail - in our systems it runs out of swap space. The
>fix was simply to #undef realloc right before the call in xrealloc.
Hope this clears up the trouble a couple of bsd sites had reported.
Context diff follows.
*** /tmp/,RCSt1a27045 Fri Oct 10 02:42:43 1986
--- arcunix.c Fri Oct 10 02:42:03 1986
***************
*** 5,10
#include <sys/errno.h>
#include <time.h>
#include "arc.h"
char *index(), *rindex(), *xalloc(), *malloc(), *realloc();
extern char *Progname;
--- 5,11 -----
#include <sys/errno.h>
#include <time.h>
#include "arc.h"
+ #undef realloc
char *index(), *rindex(), *xalloc(), *malloc(), *realloc();
extern char *Progname;
--
Stu Heiss {ihnp4!jpusa1!stu}
More information about the Comp.sources.bugs
mailing list