Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-05 08:36:14 +0400
committerChristopher Faylor <me@cgf.cx>2001-10-05 08:36:14 +0400
commitf978840beefd9d0ac3fb9a26f5440eb9b20584c9 (patch)
treeac07b9b2fca5cd42e307f418811663f85aefa9b7
parent8d817b0f9ed20cfa5e9482074999c2973a2a9543 (diff)
* heap.h (inheap): Check for NULL.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/child_info.h2
-rw-r--r--winsup/cygwin/debug.h6
-rw-r--r--winsup/cygwin/fork.cc1
-rw-r--r--winsup/cygwin/heap.h2
5 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d09b8a5c5..a6ee4c4d5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Fri Oct 5 00:31:35 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * heap.h (inheap): Check for NULL.
+
Thu Oct 4 23:17:49 2001 Christopher Faylor <cgf@cygnus.com>
Add second path_conv * argument to fstat()s throughout.
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h
index 983675877..7827d853f 100644
--- a/winsup/cygwin/child_info.h
+++ b/winsup/cygwin/child_info.h
@@ -12,7 +12,7 @@ details. */
enum
{
- PROC_MAGIC = 0xaf12f000,
+ PROC_MAGIC = 0xaf13f000,
PROC_FORK = PROC_MAGIC + 1,
PROC_EXEC = PROC_MAGIC + 2,
PROC_SPAWN = PROC_MAGIC + 3,
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
index 8323e617a..fdd3d3ccd 100644
--- a/winsup/cygwin/debug.h
+++ b/winsup/cygwin/debug.h
@@ -13,6 +13,12 @@ details. */
#include "dlmalloc.h"
#define MALLOC_CHECK ({\
debug_printf ("checking malloc pool");\
+ free (malloc (20));\
+ free (malloc (128));\
+ free (malloc (4096));\
+ free (malloc (16384));\
+ free (malloc (32768));\
+ free (malloc (65536));\
(void)mallinfo ();\
})
#endif
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 78d1abe01..adac0ce9d 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -315,6 +315,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
/* Initialize signal/process handling */
sigproc_init ();
__pthread_atforkchild ();
+ MALLOC_CHECK;
cygbench ("fork-child");
return 0;
}
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/heap.h
index df652ac22..bcea4bae0 100644
--- a/winsup/cygwin/heap.h
+++ b/winsup/cygwin/heap.h
@@ -15,5 +15,5 @@ void heap_init ();
void malloc_init ();
#define inheap(s) \
- (cygheap->heapptr && ((char *) (s) >= (char *) cygheap->heapbase) \
+ (cygheap->heapptr && s && ((char *) (s) >= (char *) cygheap->heapbase) \
&& ((char *) (s) <= (char *) cygheap->heaptop))