unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Buffer size limitation in insdel.c
Date: Sat, 25 Sep 2010 15:55:26 +0200	[thread overview]
Message-ID: <831v8irkq9.fsf@gnu.org> (raw)
In-Reply-To: <m3tylfnr53.fsf@quimbies.gnus.org>

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 24 Sep 2010 16:38:16 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > The reason for this code is that many places use an int to hold buffer
> > positions.  All these places are bugs; they should use EMACS_INT
> > instead.  This code hides those bugs.
> 
> After we've done the initial EMACS_INT/int sweep (shouldn't take more
> than a week, right?  :-), we can remove the limitation, try to load a big
> file, and see what happens...

I've now finished reviewing all the sources that Lars didn't handle
and fixing any uses of int for buffer and string positions and sizes.
The only places where I left such code that uses ints unchanged is
when the string or buffer is known in advance to be short.  A typical
example is a string that is a name of a symbol, or a message shown in
the echo area.  I also left alone code that processes the doc strings.

Files I didn't review are: w32*.c files (since the 32-bit Windows
build obviously is not affected), and xselect.c (if it's possible to
have X selections larger than 2GB, then someone who knows more than I
do about this should take a look).

Whether to remove the above limitation should now be a purely
managerial decision.  Stefan and Chong, your call.

P.S.  Note that I went through the sources manually, not with GCC
warnings that Lars used.  So I only fixed code that used ints to refer
to buffer and string positions, not every place where an EMACS_INT is
placed into an int.  And that's in addition to any places I could have
missed, of course.



  reply	other threads:[~2010-09-25 13:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22 12:06 Buffer size limitation in insdel.c Eli Zaretskii
2010-09-22 12:12 ` Lars Magne Ingebrigtsen
2010-09-22 15:20   ` Eli Zaretskii
2010-09-22 12:16 ` David Kastrup
2010-09-23  0:06 ` Stefan Monnier
2010-09-23  0:58 ` Richard Stallman
2010-09-23  7:55   ` Eli Zaretskii
2010-09-23  9:23     ` Leo
2010-09-23  9:30       ` Eli Zaretskii
2010-09-23 10:59     ` Lars Magne Ingebrigtsen
2010-09-23 12:15       ` Eli Zaretskii
2010-09-23 12:18         ` Lars Magne Ingebrigtsen
2010-09-23 12:47           ` Lars Magne Ingebrigtsen
2010-09-23 13:12             ` Andreas Schwab
2010-09-23 13:22             ` Eli Zaretskii
2010-09-23 13:37               ` Lars Magne Ingebrigtsen
2010-09-23 14:13                 ` Eli Zaretskii
2010-09-23 14:21                   ` Lars Magne Ingebrigtsen
2010-09-23 14:31                     ` Lars Magne Ingebrigtsen
2010-09-23 14:41                     ` Eli Zaretskii
2010-09-23 14:49                       ` Lars Magne Ingebrigtsen
2010-09-23 15:08                         ` Lars Magne Ingebrigtsen
2010-09-23 18:56                         ` Eli Zaretskii
2010-09-23 19:02                           ` Lars Magne Ingebrigtsen
2010-09-23 19:22                             ` Eli Zaretskii
2010-09-24 14:09     ` Richard Stallman
2010-09-24 14:28       ` Eli Zaretskii
2010-09-24 14:38         ` Lars Magne Ingebrigtsen
2010-09-25 13:55           ` Eli Zaretskii [this message]
2010-09-25 16:26             ` Lars Magne Ingebrigtsen
2010-09-25 16:38               ` Lars Magne Ingebrigtsen
2010-09-25  9:40         ` Richard Stallman
2010-09-25 10:00           ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=831v8irkq9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).