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:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/malloc_wrapper.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ef1fbab1f..873b94346 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2013-01-23 Christopher Faylor <me.cygwin2013@cgf.cx>
+ * miscfuncs.cc (__import_address): Check if malloc field points
+ directly at 'malloc'.
+
+2013-01-23 Christopher Faylor <me.cygwin2013@cgf.cx>
+
* miscfuncs.cc (__import_address): On second thought, the chance that
this pointer could be NULL is very low so don't bother checking for it.
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index c514af345..2adacba9c 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -286,7 +286,8 @@ malloc_init ()
extern void *_sigfe_malloc;
/* Decide if we are using our own version of malloc by testing the import
address from user_data. */
- use_internal = import_address (user_data->malloc) == &_sigfe_malloc;
+ use_internal = user_data->malloc == malloc
+ || import_address (user_data->malloc) == &_sigfe_malloc;
malloc_printf ("using %s malloc", use_internal ? "internal" : "external");
internal_malloc_determined = true;
}