aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-04-22 00:50:17 -0700
committerPaul Eggert2012-04-22 00:50:17 -0700
commitda05bc4c1f811079e53dbda24fb3661714f6bde1 (patch)
treef78258c799504a24ea60a2c9ad8cc94dee874d9a
parent52828e02c36f599bfe75a527fecc16ace3fb6323 (diff)
downloademacs-da05bc4c1f811079e53dbda24fb3661714f6bde1.tar.gz
emacs-da05bc4c1f811079e53dbda24fb3661714f6bde1.zip
Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
* alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]: Do not assume ptrdiff_t is the same width as 'int'.
-rw-r--r--src/ChangeLog4
-rw-r--r--src/alloc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fb7498b6298..a1220aeaa7d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12012-04-22 Paul Eggert <eggert@cs.ucla.edu> 12012-04-22 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
4 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
5 Do not assume ptrdiff_t is the same width as 'int'.
6
3 * alloc.c: Handle unusual debugging option combinations. 7 * alloc.c: Handle unusual debugging option combinations.
4 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK, 8 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
5 since the two debugging options are incompatible. 9 since the two debugging options are incompatible.
diff --git a/src/alloc.c b/src/alloc.c
index b029343a848..6c9af7b71fa 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1314,7 +1314,7 @@ emacs_blocked_malloc (size_t size, const void *ptr)
1314 { 1314 {
1315 fprintf (stderr, "Malloc returned %p which is already in use\n", 1315 fprintf (stderr, "Malloc returned %p which is already in use\n",
1316 value); 1316 value);
1317 fprintf (stderr, "Region in use is %p...%p, %u bytes, type %d\n", 1317 fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n",
1318 m->start, m->end, (char *) m->end - (char *) m->start, 1318 m->start, m->end, (char *) m->end - (char *) m->start,
1319 m->type); 1319 m->type);
1320 abort (); 1320 abort ();