From: Paul Eggert Date: Sun, 22 Apr 2012 07:50:17 +0000 (-0700) Subject: Fix GC_MALLOC_CHECK debugging output on 64-bit hosts. X-Git-Tag: emacs-24.2.90~471^2~316 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da05bc4c1f811079e53dbda24fb3661714f6bde1;p=emacs.git 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'. --- diff --git a/src/ChangeLog b/src/ChangeLog index fb7498b6298..a1220aeaa7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2012-04-22 Paul Eggert + 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'. + * alloc.c: Handle unusual debugging option combinations. (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK, 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) { fprintf (stderr, "Malloc returned %p which is already in use\n", value); - fprintf (stderr, "Region in use is %p...%p, %u bytes, type %d\n", + fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n", m->start, m->end, (char *) m->end - (char *) m->start, m->type); abort ();