public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: libc-hacker@cygnus.com (GNU C Library)
Subject: A patch for malloc
Date: Tue, 11 Aug 1998 07:38:00 -0000	[thread overview]
Message-ID: <m0z6FZX-000391C@ocean.lucon.org> (raw)

Here is a patch for malloc. It is quite confusing without 0x.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---
Tue Aug 11 07:37:50 1998  H.J. Lu  (hjl@gnu.org)

	* malloc/malloc.c (free_check): Add 0x to print a pointer.
	(realloc_check): Likewise.

Index: malloc/malloc.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc-2.0/malloc/malloc.c,v
retrieving revision 1.1.1.4
diff -p -u -r1.1.1.4 malloc.c
--- malloc.c	1998/05/20 21:51:16	1.1.1.4
+++ malloc.c	1998/08/11 14:36:20
@@ -4269,7 +4269,7 @@ free_check(mem) Void_t* mem;
     (void)mutex_unlock(&main_arena.mutex);
     switch(check_action) {
     case 1:
-      fprintf(stderr, "free(): invalid pointer %lx!\n", (long)(mem));
+      fprintf(stderr, "free(): invalid pointer 0x%lx!\n", (long)(mem));
       break;
     case 2:
       abort();
@@ -4307,7 +4307,7 @@ realloc_check(oldmem, bytes) Void_t* old
     (void)mutex_unlock(&main_arena.mutex);
     switch(check_action) {
     case 1:
-      fprintf(stderr, "realloc(): invalid pointer %lx!\n", (long)(oldmem));
+      fprintf(stderr, "realloc(): invalid pointer 0x%lx!\n", (long)(oldmem));
       break;
     case 2:
       abort();

             reply	other threads:[~1998-08-11  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-11  7:38 H.J. Lu [this message]
1998-08-11 14:02 ` Ulrich Drepper
     [not found] <37AB46E7.7228E760@wserv.com>
1999-08-06 14:33 ` H.J. Lu
1999-08-06 15:59   ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0z6FZX-000391C@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=libc-hacker@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).