diff options
author | Christopher Faylor <me@cgf.cx> | 2013-01-23 18:24:34 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-01-23 18:24:34 +0400 |
commit | a69e27906f250cfd96dfd431fd79b3749133128d (patch) | |
tree | b8588a244552722e17c94e245dae050fd5e7a0b0 /winsup/cygwin/malloc_wrapper.cc | |
parent | 0e8c8b009361a87243874b8e576b9326d8ec9ab2 (diff) |
* miscfuncs.cc (__import_address): Check if malloc field points directly at
'malloc'.
Diffstat (limited to 'winsup/cygwin/malloc_wrapper.cc')
-rw-r--r-- | winsup/cygwin/malloc_wrapper.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |