From: Paul Eggert <eggert@cs.ucla.edu>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 9079@debbugs.gnu.org
Subject: bug#9079: integer overflow etc. issues (e.g., image crashes Emacs)
Date: Thu, 14 Jul 2011 09:15:36 -0700 [thread overview]
Message-ID: <4E1F1628.8030007@cs.ucla.edu> (raw)
In-Reply-To: <m3r55tgtk6.fsf@hase.home>
On 07/14/11 01:22, Andreas Schwab wrote:
>> -#define __malloc_size_t int
>> +#define __malloc_size_t size_t
>
> There is no point in using that name any more.
Thanks, I can easily install the following further patch as well.
There are similar usages in gmalloc.c but that's verging even more
into code cleanup and at this point I assume we should be focusing
on the bug fixes.
* alloc.c (__malloc_size_t): Remove.
All uses replaced by size_t. See Andreas Schwab's note
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
=== modified file 'src/alloc.c'
--- src/alloc.c 2011-07-13 03:45:56 +0000
+++ src/alloc.c 2011-07-14 16:03:17 +0000
@@ -68,10 +68,6 @@
#ifdef DOUG_LEA_MALLOC
#include <malloc.h>
-/* malloc.h #defines this as size_t, at least in glibc2. */
-#ifndef __malloc_size_t
-#define __malloc_size_t size_t
-#endif
/* Specify maximum number of areas to mmap. It would be nice to use a
value that explicitly means "no limit". */
@@ -82,9 +78,8 @@
/* The following come from gmalloc.c. */
-#define __malloc_size_t size_t
-extern __malloc_size_t _bytes_used;
-extern __malloc_size_t __malloc_extra_blocks;
+extern size_t _bytes_used;
+extern size_t __malloc_extra_blocks;
#endif /* not DOUG_LEA_MALLOC */
@@ -1111,11 +1106,11 @@
# define BYTES_USED _bytes_used
#endif
-static __malloc_size_t bytes_used_when_reconsidered;
+static size_t bytes_used_when_reconsidered;
/* Value of _bytes_used, when spare_memory was freed. */
-static __malloc_size_t bytes_used_when_full;
+static size_t bytes_used_when_full;
/* This function is used as the hook for free to call. */
next prev parent reply other threads:[~2011-07-14 16:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 7:55 bug#9079: integer overflow etc. issues (e.g., image crashes Emacs) Paul Eggert
2011-07-14 8:22 ` Andreas Schwab
2011-07-14 16:15 ` Paul Eggert [this message]
2011-07-14 8:47 ` Eli Zaretskii
2011-07-14 16:23 ` Paul Eggert
2011-07-14 17:48 ` Eli Zaretskii
2011-07-14 22:02 ` Paul Eggert
2011-07-15 5:46 ` Eli Zaretskii
2011-07-15 7:22 ` Paul Eggert
2011-07-14 12:54 ` Leo
[not found] ` <handler.9079.B.13106301884386.ack@debbugs.gnu.org>
2011-07-28 0:49 ` bug#9079: Acknowledgement (integer overflow etc. issues (e.g., image crashes Emacs)) Paul Eggert
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=4E1F1628.8030007@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=9079@debbugs.gnu.org \
--cc=schwab@linux-m68k.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.