summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-08-31 09:46:40 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-08-31 09:46:40 +0000
commit2e0f2f691aa2a8f5aab07e219c73f0a62d22ff55 (patch)
tree580ded1b382361476242dc4b2d37a6b7dd5481fd
parentf960bc485747a32d63f32590f368f01a2ab927df (diff)
downloadmpc-2e0f2f691aa2a8f5aab07e219c73f0a62d22ff55.tar.gz
[tests/memory.c] in tests_free and tests_reallocate, print the pointer value
in case of error, maybe this will help isolating the errors on x86_64-darwin (http://hydra.nixos.org/build/1290889) git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1048 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--tests/memory.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/memory.c b/tests/memory.c
index 289945e..d4f8cf4 100644
--- a/tests/memory.c
+++ b/tests/memory.c
@@ -118,8 +118,9 @@ tests_reallocate (void *ptr, size_t old_size, size_t new_size)
{
/* Note: we should use the standard %zu to print sizes, but
this is not supported by old C implementations. */
- printf ("tests_reallocate(): bad old size %lu, should be %lu\n",
- (unsigned long) old_size, (unsigned long) h->size);
+ printf ("tests_reallocate(): bad old size %lu at 0x%lX, should be %lu\n",
+ (unsigned long) old_size, (unsigned long) ptr,
+ (unsigned long) h->size);
abort ();
}
@@ -163,8 +164,9 @@ tests_free (void *ptr, size_t size)
{
/* Note: we should use the standard %zu to print sizes, but
this is not supported by old C implementations. */
- printf ("tests_free(): bad size %lu, should be %lu\n",
- (unsigned long) size, (unsigned long) h->size);
+ printf ("tests_free(): bad size %lu at 0x%lX, should be %lu\n",
+ (unsigned long) size, (unsigned long) ptr,
+ (unsigned long) h->size);
abort ();
}