aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/cygheap.cc2
-rw-r--r--winsup/cygwin/exceptions.cc4
3 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ee455ca..7afb90b 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+Thu Sep 6 14:03:49 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * cygheap.cc (cygheap_fixup_in_child): Don't consider a NULL bucket as
+ a candidate for deletion. It is actually the end of a linked list
+ chain.
+
+ * exceptions.cc (open_stackdumpfile): Default to "unknown" program name
+ if myself->progname hasn't been filled out yet.
+
Thu Sep 6 01:16:44 2001 Christopher Faylor <cgf@cygnus.com>
Move appropriate variables to NO_COPY segment, throughout.
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 8c45b1b..53a66cf 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -136,7 +136,7 @@ cygheap_fixup_in_child (child_info *ci, bool execed)
for (_cmalloc_entry *rvc = cygheap->chain; rvc; rvc = rvc->prev)
{
cygheap_entry *ce = (cygheap_entry *) rvc->data;
- if (rvc->b >= NBUCKETS || ce->type <= HEAP_1_START)
+ if (!rvc->ptr || rvc->b >= NBUCKETS || ce->type <= HEAP_1_START)
continue;
else if (ce->type < HEAP_1_MAX)
ce->type += HEAP_1_MAX; /* Mark for freeing after next exec */
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index cdeb112..a06774d 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -158,7 +158,9 @@ open_stackdumpfile ()
{
const char *p;
/* write to progname.stackdump if possible */
- if ((p = strrchr (myself->progname, '\\')))
+ if (!myself->progname[0])
+ p = "unknown";
+ else if ((p = strrchr (myself->progname, '\\')))
p++;
else
p = myself->progname;