[uClibc-cvs] CVS update of uClibc/libc/stdlib/malloc-standard (malloc.h)
Erik Andersen
andersen at codepoet.org
Wed Aug 25 23:46:47 UTC 2004
Date: Wednesday, August 25, 2004 @ 17:46:47
Author: andersen
Path: /var/cvs/uClibc/libc/stdlib/malloc-standard
Modified: malloc.h (1.3 -> 1.4)
Mike Frysinger writes:
this was sent earlier in a different form:
http://www.uclibc.org/lists/uclibc/2004-January/008136.html
find attached a smaller version ... perhaps adding a fprintf to stderr before
calling abort would be nice like in the glibc patch, but whatever
glibc has since adopted a similar fix for their malloc (third hunk, line 1970)
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/malloc/malloc.c.diff?r1=1.121&r2=1.122&cvsroot=glibc&f=h
-mike
Index: uClibc/libc/stdlib/malloc-standard/malloc.h
diff -u uClibc/libc/stdlib/malloc-standard/malloc.h:1.3 uClibc/libc/stdlib/malloc-standard/malloc.h:1.4
--- uClibc/libc/stdlib/malloc-standard/malloc.h:1.3 Thu Jul 15 02:31:31 2004
+++ uClibc/libc/stdlib/malloc-standard/malloc.h Wed Aug 25 17:46:46 2004
@@ -20,6 +20,7 @@
#include <errno.h>
#include <string.h>
#include <malloc.h>
+#include <stdlib.h>
#ifdef __UCLIBC_HAS_THREADS__
@@ -645,6 +646,8 @@
#define unlink(P, BK, FD) { \
FD = P->fd; \
BK = P->bk; \
+ if (FD->bk != P || BK->fd != P) \
+ abort(); \
FD->bk = BK; \
BK->fd = FD; \
}
More information about the uClibc-cvs
mailing list