emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer size limitation in insdel.c


From: Eli Zaretskii
Subject: Re: Buffer size limitation in insdel.c
Date: Fri, 24 Sep 2010 16:28:01 +0200

> From: Richard Stallman <address@hidden>
> CC: address@hidden
> Date: Fri, 24 Sep 2010 10:09:15 -0400
> 
>     It hides bugs, if nothing else.
> 
> Could you please explain what you mean?  Usually an error check does
> not hide bugs; rather, it catches them early.

Ah, but this is not an error check.  This code prevents us from using
buffers larger than what a 32-bit int can cover, i.e. 2GB.  By
contrast, an Emacs integer is a 64-bit type on 64-bit machines, so we
could potentially have much larger buffers there.

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]