diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-01-16 16:19:37 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-01-16 16:19:37 +0000 |
commit | a62dbcd6e03ff182e7d36ea60d953f447db72d62 (patch) | |
tree | 1f400f2d1a8e0b1858a18dde247222c8c09fe827 /winsup/cygwin/malloc_wrapper.cc | |
parent | ad45d512debb05dd8a323c0024adc6222810964c (diff) | |
download | cygnal-a62dbcd6e03ff182e7d36ea60d953f447db72d62.tar.gz cygnal-a62dbcd6e03ff182e7d36ea60d953f447db72d62.tar.bz2 cygnal-a62dbcd6e03ff182e7d36ea60d953f447db72d62.zip |
* gendef: Export _sigbe on 64 bit as well.
* malloc_wrapper.cc (free): In malloc_printf, call caller_return_address
instead of __builtin_return_address.
(malloc): Ditto.
(realloc): Ditto.
(calloc): Ditto.
* miscfuncs.cc (__caller_return_address): New function.
* miscfuncs.h (caller_return_address): New macro calling
__caller_return_address.
(__caller_return_address): Add prototype.
Diffstat (limited to 'winsup/cygwin/malloc_wrapper.cc')
-rw-r--r-- | winsup/cygwin/malloc_wrapper.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc index 68c851440..43b8144b2 100644 --- a/winsup/cygwin/malloc_wrapper.cc +++ b/winsup/cygwin/malloc_wrapper.cc @@ -1,7 +1,7 @@ /* malloc_wrapper.cc Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2013 Red Hat, Inc. + 2007, 2008, 2009, 2013, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -38,7 +38,7 @@ static bool internal_malloc_determined; extern "C" void free (void *p) { - malloc_printf ("(%p), called by %p", p, __builtin_return_address (0)); + malloc_printf ("(%p), called by %p", p, caller_return_address ()); if (!use_internal) user_data->free (p); else @@ -61,7 +61,8 @@ malloc (size_t size) res = dlmalloc (size); __malloc_unlock (); } - malloc_printf ("(%ld) = %p, called by %p", size, res, __builtin_return_address (0)); + malloc_printf ("(%ld) = %p, called by %p", size, res, + caller_return_address ()); return res; } @@ -77,7 +78,8 @@ realloc (void *p, size_t size) res = dlrealloc (p, size); __malloc_unlock (); } - malloc_printf ("(%p, %ld) = %p, called by %p", p, size, res, __builtin_return_address (0)); + malloc_printf ("(%p, %ld) = %p, called by %p", p, size, res, + caller_return_address ()); return res; } @@ -104,7 +106,8 @@ calloc (size_t nmemb, size_t size) res = dlcalloc (nmemb, size); __malloc_unlock (); } - malloc_printf ("(%ld, %ld) = %p, called by %p", nmemb, size, res, __builtin_return_address (0)); + malloc_printf ("(%ld, %ld) = %p, called by %p", nmemb, size, res, + caller_return_address ()); return res; } |