From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 26 Mar 2009 16:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123808264717218 (code B ref -1); Thu, 26 Mar 2009 16:00:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Mar 2009 15:50:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QFohJJ017210 for ; Thu, 26 Mar 2009 08:50:45 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lmrqt-00064n-GR for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lmrqn-00061u-Up for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:42 -0400 Received: from [199.232.76.173] (port=51189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lmrqn-00061l-Rf for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:37 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:40356) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lmrqn-0006qW-FA for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:37 -0400 Received: by ewy4 with SMTP id 4so685337ewy.42 for ; Thu, 26 Mar 2009 08:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=cvdaT7CCumxyNut08Z/BPWzfpE412yG3QSqFPPb6vf4=; b=ULZ/Jizr4ajUNQbZF3jI7SVdy3phj15yv+TsDvF39FPR464IK52hdqBvEUXPLBEV6N lbst9RRQxycIN6NxmYxPTG7WDEDEViqQRVSkxAC7PCQ1bhYlph6AKSbn+7jr51SpRSm0 JXwq8WLyjzzbHwr5xFYxkAwCoT3DWoZFDR99E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=YfNngwYp0u78lbYUjspEsAnAR+9HFHXXGugLGhnZhx9hZKkg4iSzEka8sPLBoyOl25 j7mu3G3G6rb/6S58rCH7gTUBjGX+P90mNSNWcaNRilFNbngBaL1uPOm9ujU2Q2vQ3mWu UJRpJc6K57Ovl4mNPfxD8oBP/Y2xyGDGnZ0pg= MIME-Version: 1.0 Received: by 10.210.35.5 with SMTP id i5mr779715ebi.88.1238082635637; Thu, 26 Mar 2009 08:50:35 -0700 (PDT) Date: Thu, 26 Mar 2009 10:50:35 -0500 Message-ID: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> From: Mike Coleman To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) I'm trying to open a large (between 4GB and 5GB) file on a x86-64 Linux box that has 64GB of RAM. I'm getting the error message "Maximum buffer size exceeded". I'm able to create 32GB strings in Python on this box, so I don't believe it's a ulimit problem or anything like that. The contents of /proc/cpuinfo say that the CPU has 48 virtual bits. I'm guessing that emacs uses maybe six bits or so for overhead, but that doesn't seem like enough to be causing my problem. Given the error message, it seems like emacs probably has an internal idea of a maximum buffer size, but apropos doesn't turn up anything. I'm sure this has been discussed and I've tried to find these discussions, but I don't seem to be able to track down the current thinking on this subject. Is this a know limitation or a bug? Can someone who knows provide a quick summary? Thanks, Mike From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 26 Mar 2009 20:05:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123809754618670 (code B ref 2790); Thu, 26 Mar 2009 20:05:07 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 26 Mar 2009 19:59:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QJx2m1018662 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 12:59:04 -0700 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KH400L00Q2Q2M00@i-mtaout6.012.net.il> for 2790@emacsbugs.donarmstrong.com; Thu, 26 Mar 2009 21:58:22 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KH400KTIQ5A80M0@i-mtaout6.012.net.il>; Thu, 26 Mar 2009 21:58:22 +0200 (IST) Date: Thu, 26 Mar 2009 21:58:14 +0200 From: Eli Zaretskii In-reply-to: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> X-012-Sender: halo1@inter.net.il To: Mike Coleman , 2790@debbugs.gnu.org Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> > Date: Thu, 26 Mar 2009 10:50:35 -0500 > From: Mike Coleman > Cc: > > I'm trying to open a large (between 4GB and 5GB) file on a x86-64 > Linux box that has 64GB of RAM. I'm getting the error message > "Maximum buffer size exceeded". Thank you for your report. However, it lacks crucial info, because you didn't use "M-x report-emacs-bug RET" to submit it. Please do that (and do it from the same version of Emacs where you get the error message), so that important aspects of your system and Emacs configuration will be reported and considered in resolving this problem. Next, please type "file `which emacs`" at the shell prompt on that machine, and tell what this command displays. Also, please type "M-: most-positive-fixnum RET" inside Emacs, and tell what it displays. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 26 Mar 2009 21:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12381013223992 (code B ref 2790); Thu, 26 Mar 2009 21:05:05 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 26 Mar 2009 21:02:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.6 required=4.0 tests=FOURLA,GMAIL,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f178.google.com (mail-ew0-f178.google.com [209.85.219.178]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QL1vBH003975 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 14:01:59 -0700 Received: by ewy26 with SMTP id 26so894180ewy.1 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 14:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4r/fEBXhhE3Vvd9ZvmeW2PT1i2gFiglIxoDZLprOWUw=; b=VenFDGP1omgbtaD4rjlx9GGKh0UQ+wVcZurKY3ZmDbvmEoTweKyTX18nCxGBnY0EuU jd+gd5TRN0nIN/XAuzlgf9RaInaOpfEeqOOCJQVaV/lte4X8NkfNgc5UsCTX3nZutXWK P94c6VjAWMZwcx5Ch1ivtj/jTFySdOEfXVQyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tgwKioQvM414gJifKImFLIFZ5WVCRbaIJ0Iolgl2Wd09WhB0AjKEMGVtsNGLFDrCq6 +BC3cFsUkca0dkHarHsLyWLXKn4yghTplHLn3l5W8/gcbDjKB1Qcn+SeMc3RYHOVL5nJ mybOoOEXPsmChrxpVnfwsIl1IhEUUISLCRr3U= MIME-Version: 1.0 Received: by 10.210.16.11 with SMTP id 11mr978834ebp.96.1238101312135; Thu, 26 Mar 2009 14:01:52 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> Date: Thu, 26 Mar 2009 16:01:51 -0500 Message-ID: <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> From: Mike Coleman To: Eli Zaretskii Cc: 2790@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, This machine isn't really connected to the Internet, but here's the contents of that buffer, after trying to load the large file in question. 'which emacs' is /usr/bin/emacs. most-positive-fixnum gives 1152921504606846975 (#o37777777777, #xffffffff) Mike Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/share/emacs/22.1/etc/DEBUG for instructions. In GNU Emacs 22.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.10.4) of 2007-08-23 on monk.karan.org Windowing system distributor `The X.Org Foundation', version 11.0.10600000 configured using `configure '--build=3Dx86_64-redhat-linux-gnu' '--host=3Dx86_64-redhat-linux-gnu' '--target=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/usr/com' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-linux-gnu' 'target_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=3D16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Mail Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: M-x r e p o r t - e m a x x x C-x 1 C-v C-v C-p C-x C-f / n / d a t a 1 / b l a s t / d b / n r y C-x M-p M-p M-n C-a C-k C-g C-g M-x r e p r t o r t - e m a Recent messages: Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)..= .done Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...= done Loading /usr/share/emacs/site-lisp/site-start.d/psgml-init.el (source)...do= ne Loading /usr/share/emacs/site-lisp/site-start.d/python-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done Loading emacsbug...done Loading help-mode...done File nr is large (4187MB), really open? (y or n) byte-code: Maximum buffer size exceeded next-history-element: Beginning of history; no preceding item Quit [2 times] On Thu, Mar 26, 2009 at 2:58 PM, Eli Zaretskii wrote: >> Date: Thu, 26 Mar 2009 10:50:35 -0500 >> From: Mike Coleman >> Cc: >> >> I'm trying to open a large (between 4GB and 5GB) file on a x86-64 >> Linux box that has 64GB of RAM. =A0I'm getting the error message >> "Maximum buffer size exceeded". > > Thank you for your report. =A0However, it lacks crucial info, because > you didn't use "M-x report-emacs-bug RET" to submit it. =A0Please do > that (and do it from the same version of Emacs where you get the error > message), so that important aspects of your system and Emacs > configuration will be reported and considered in resolving this > problem. > > Next, please type "file `which emacs`" at the shell prompt on that > machine, and tell what this command displays. > > Also, please type "M-: most-positive-fixnum RET" inside Emacs, and > tell what it displays. > From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 26 Mar 2009 21:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12381020847507 (code B ref 2790); Thu, 26 Mar 2009 21:20:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 26 Mar 2009 21:14:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.7 required=4.0 tests=GMAIL,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QLEe8P007501 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 14:14:42 -0700 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KH400B00TIC4I00@i_mtaout3.012.net.il> for 2790@emacsbugs.donarmstrong.com; Thu, 26 Mar 2009 23:14:34 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH400DMXTOAGPD0@i_mtaout3.012.net.il>; Thu, 26 Mar 2009 23:14:34 +0200 (IST) Date: Thu, 26 Mar 2009 23:14:15 +0200 From: Eli Zaretskii In-reply-to: <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> X-012-Sender: halo1@inter.net.il To: Mike Coleman Cc: 2790@debbugs.gnu.org Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> > Date: Thu, 26 Mar 2009 16:01:51 -0500 > From: Mike Coleman > Cc: 2790@emacsbugs.donarmstrong.com > > 'which emacs' is /usr/bin/emacs. I asked to type "file `which emacs`". The `file' part is important. > most-positive-fixnum gives > > 1152921504606846975 (#o37777777777, #xffffffff) That sounds like a bug: the decimal representation is like I'd expect on a 64-bit machine, but the octal and hex representations are like on a 32-bit machine. Strange... Perhaps this is some bug that was in Emacs 22.1. Can you upgrade to 22.3? From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 26 Mar 2009 21:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123810321812734 (code B ref 2790); Thu, 26 Mar 2009 21:40:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 26 Mar 2009 21:33:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.6 required=4.0 tests=FOURLA,GMAIL,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f178.google.com (mail-ew0-f178.google.com [209.85.219.178]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QLXYbE012720 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 14:33:36 -0700 Received: by ewy26 with SMTP id 26so906934ewy.1 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 14:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=KJDZADLXrEt1AxFPmpVRXzGG+GHoyaxIl0Vrvt1gNKU=; b=YkmkaptsWGI/nknQ8ZjzmqHU0QfHfjTySAeX6oTm+LQ22fZtb8PZOsTqhdbqT/J/No 64gqUBO8b/7s0XGrn5KcziMjzmGlSaSwpnyvMXmJkdB5veLusdY8/XZWHII17FcLsLwA wp6bJqC+xjpizOqnhqv2rq2eQFHYFpY9/laLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=BF3Zm1VQpZ/NQkfpJV39ODjIcm/VDcvyYcBvfz08cRIRlqLu1W8qJ9IXi7nwiiMX9r Y5ATzWZUED702Mgb4r+b8azWmgnX3dtMDZrvXGwA57jwnUjPPiJmbap5O+rFZCzOM0So MrUYm4pQf5Dqpf3BtNjv5nRJIsjc5TmFbWZd4= MIME-Version: 1.0 Received: by 10.210.82.2 with SMTP id f2mr233734ebb.37.1238103209182; Thu, 26 Mar 2009 14:33:29 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> Date: Thu, 26 Mar 2009 16:33:29 -0500 Message-ID: <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> From: Mike Coleman To: Eli Zaretskii Cc: 2790@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Mar 26, 2009 at 4:14 PM, Eli Zaretskii wrote: >> Date: Thu, 26 Mar 2009 16:01:51 -0500 >> From: Mike Coleman >> Cc: 2790@emacsbugs.donarmstrong.com >> >> 'which emacs' is /usr/bin/emacs. > > I asked to type "file `which emacs`". =A0The `file' part is important. Ah, missed it. Here you go: $ file `which emacs` /usr/bin/emacs: symbolic link to `/etc/alternatives/emacs' Also $ file -L `which emacs` /usr/bin/emacs: sticky ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped in case that's where we were headed. :-) And $ lsb_release -rd Description: CentOS release 5.2 (Final) Release: 5.2 >> most-positive-fixnum gives >> >> =A0 =A0 1152921504606846975 (#o37777777777, #xffffffff) > > That sounds like a bug: the decimal representation is like I'd expect > on a 64-bit machine, but the octal and hex representations are like on > a 32-bit machine. =A0Strange... Yeah, that looked a little odd to me, too. I gather from your questions that this (loading the large file) was more or less supposed to work? > Perhaps this is some bug that was in Emacs 22.1. =A0Can you upgrade to > 22.3? This distribution version has no later package available. I can just go ahead and build from source, though. Are there any particular flags I should use, etc., to support this debugging process? Mike From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 00:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123811395029142 (code B ref 2790); Fri, 27 Mar 2009 00:40:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 00:32:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2R0WRQ1029135 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 17:32:28 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEANe7y0lFxIfy/2dsb2JhbACBUM4Hg3cGhHU X-IronPort-AV: E=Sophos;i="4.38,429,1233550800"; d="scan'208";a="35745424" Received: from 69-196-135-242.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 26 Mar 2009 20:32:09 -0400 Received: by pastel.home (Postfix, from userid 20848) id 548667F74; Thu, 26 Mar 2009 20:32:08 -0400 (EDT) From: Stefan Monnier To: Mike Coleman Cc: 2790@debbugs.gnu.org, Eli Zaretskii Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> Date: Thu, 26 Mar 2009 20:32:08 -0400 In-Reply-To: <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> (Mike Coleman's message of "Thu, 26 Mar 2009 16:33:29 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I gather from your questions that this (loading the large file) was > more or less supposed to work? Well, on 32bit machines, the largest file you can open is 256MB or so. In a 64bit system, the limit is much larger (so you really shouldn't see the "Maximum buffer size exceeded" message you're seeing), but then again, there are various places in the C code where we turn buffer-positions into `int', so things larger than 2GB will hit bugs sooner or later (which will manifest in various funny ways). These bugs shouldn't be too hard to fix, but even with my 4GB machine, opening such large files is really painful, which makes it difficult to debug. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 00:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123811438430504 (code B ref 2790); Fri, 27 Mar 2009 00:45:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 00:39:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2R0dehf030498 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 17:39:41 -0700 Received: by ey-out-2122.google.com with SMTP id 25so191796eya.13 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 17:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/tC4CBvmR4HYuda4LLfNnslxJAv0V8VffH2UqRFNELw=; b=ixmH8k+wroHbhOpikAAQ1bM7DqdSBofb9sfLgA8Lbu07lPsfMa3oyamnFPHhxDxDHW lL2/4QnoMvAJkntdRDc4V50ZEukzSZ7POrejJogwrt11DrlPWghwKe17u8i/plKyPS9J wq/0WMX4fEPhQy/HR7+Rt4eqM4G+glhrhwMHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=L0qSK/WVKbHPnDpPhFjbMhqAG8RrGgWM0qndpeXl6vSq2PbRUQkXwOAGRuFZnRzZEG cPFCaBVHpPmU1oBAncMWrVOg3RwQb0BrNkBU8pz+5boQr18bmy600xiz/mw3F1hn0aeO RVd15aWeaR3MykTWi9R9N/iga8otYTyruM+V4= MIME-Version: 1.0 Received: by 10.210.12.18 with SMTP id 18mr1137217ebl.67.1238114379578; Thu, 26 Mar 2009 17:39:39 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> Date: Thu, 26 Mar 2009 19:39:39 -0500 Message-ID: <3c6c07c20903261739i25c214d4s76ea5c126e168e18@mail.gmail.com> From: Mike Coleman To: Stefan Monnier Cc: 2790@debbugs.gnu.org, Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Mar 26, 2009 at 7:32 PM, Stefan Monnier wrote: >=A0These bugs > shouldn't be too hard to fix, but even with my 4GB machine, opening such > large files is really painful, which makes it difficult to debug. I understand. Part of the reason I'm reporting this is that have easy access to a somewhat unusually large machine. I don't know much of anything about debugging emacs per se (as opposed to any random GNU C program), but if I can get some hints, I'll try to do what I can. Mike From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 03:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12381233376607 (code B ref 2790); Fri, 27 Mar 2009 03:15:02 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 03:08:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2R38q5e006592 for <2790@emacsbugs.donarmstrong.com>; Thu, 26 Mar 2009 20:08:54 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEACvgy0lFxIfy/2dsb2JhbACBUNAZg3cGhHU X-IronPort-AV: E=Sophos;i="4.38,430,1233550800"; d="scan'208";a="35749951" Received: from 69-196-135-242.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 26 Mar 2009 23:08:47 -0400 Received: by pastel.home (Postfix, from userid 20848) id 69EA67F74; Thu, 26 Mar 2009 23:08:46 -0400 (EDT) From: Stefan Monnier To: Mike Coleman Cc: 2790@debbugs.gnu.org, Eli Zaretskii Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> <3c6c07c20903261739i25c214d4s76ea5c126e168e18@mail.gmail.com> Date: Thu, 26 Mar 2009 23:08:46 -0400 In-Reply-To: <3c6c07c20903261739i25c214d4s76ea5c126e168e18@mail.gmail.com> (Mike Coleman's message of "Thu, 26 Mar 2009 19:39:39 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable >> =A0These bugs shouldn't be too hard to fix, but even with my 4GB >> machine, opening such large files is really painful, which makes it >> difficult to debug. > I understand. Part of the reason I'm reporting this is that have easy > access to a somewhat unusually large machine. I don't know much of > anything about debugging emacs per se (as opposed to any random GNU C > program), but if I can get some hints, I'll try to do what I can. Most of those bugs get fixed over time as we work on other bugs in nearby areas. So there's no point debugging an old version of the code, because there's a good chance that several of the bugs you're going to hit have been fixed already. I.e. first try it with the head the trunk of the CVS repository. Then report here with the problems you encounter. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: rms@gnu.org, 2790@debbugs.gnu.org Resent-From: Richard M Stallman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 05:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12381299762959 (code B ref -1); Fri, 27 Mar 2009 05:05:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Mar 2009 04:59:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2R4xXbl002953 for ; Thu, 26 Mar 2009 21:59:34 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ln4AH-0005qp-0J for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 00:59:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ln4AB-0005mv-UV for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 00:59:32 -0400 Received: from [199.232.76.173] (port=36856 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ln4AB-0005ms-Ql for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 00:59:27 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:58716) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ln4AB-00055t-Ea for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 00:59:27 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Ln4AB-0008Es-34; Fri, 27 Mar 2009 00:59:27 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: Richard M Stallman To: Mike Coleman , 2790@debbugs.gnu.org CC: bug-gnu-emacs@gnu.org In-reply-to: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> (message from Mike Coleman on Thu, 26 Mar 2009 10:50:35 -0500) References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> Message-Id: Date: Fri, 27 Mar 2009 00:59:27 -0400 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please try the pretest of Emacs 23 and see if it works. See ftp://alpha.gnu.org/gnu/emacs/pretest/. And please don't call it a "Linux box". The system running in it is more GNU than Linux, so please call it a GNU/Linux box. (See http://www.gnu.org/gnu/gnu-linux-faq.html.) From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 08:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123814371632340 (code B ref 2790); Fri, 27 Mar 2009 08:55:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 08:48:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=GMAIL,HAS_BUG_NUMBER, RCVD_IN_NIX1 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2R8mW64032334 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 01:48:33 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KH500J00PAQ6D00@i_mtaout2.012.net.il> for 2790@emacsbugs.donarmstrong.com; Fri, 27 Mar 2009 11:48:25 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH500FVBPSOKFX1@i_mtaout2.012.net.il>; Fri, 27 Mar 2009 11:48:25 +0300 (IDT) Date: Fri, 27 Mar 2009 11:46:22 +0300 From: Eli Zaretskii In-reply-to: <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> X-012-Sender: halo1@inter.net.il To: Mike Coleman Cc: 2790@debbugs.gnu.org Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> > Date: Thu, 26 Mar 2009 16:33:29 -0500 > From: Mike Coleman > Cc: 2790@emacsbugs.donarmstrong.com > > I gather from your questions that this (loading the large file) was > more or less supposed to work? Yes, and rather more than less ;-) From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 11:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12381529299775 (code B ref 2790); Fri, 27 Mar 2009 11:30:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 11:22:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.7 required=4.0 tests=GMAIL,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2RBM4ms009762 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 04:22:06 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 944401C14E70; Fri, 27 Mar 2009 12:24:39 +0100 (CET) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 325AD901EB; Fri, 27 Mar 2009 12:21:59 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id V3k349BBpkyb; Fri, 27 Mar 2009 12:21:58 +0100 (CET) Received: from igel.home (DSL01.83.171.182.64.ip-pool.NEFkom.net [83.171.182.64]) by mail.mnet-online.de (Postfix) with ESMTP; Fri, 27 Mar 2009 12:21:57 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id 9C85710DDDB; Fri, 27 Mar 2009 12:21:57 +0100 (CET) From: Andreas Schwab To: Eli Zaretskii Cc: 2790@debbugs.gnu.org, Mike Coleman References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> X-Yow: What UNIVERSE is this, please?? Date: Fri, 27 Mar 2009 12:21:57 +0100 In-Reply-To: (Eli Zaretskii's message of "Thu, 26 Mar 2009 23:14:15 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Eli Zaretskii writes: >> Date: Thu, 26 Mar 2009 16:01:51 -0500 >> From: Mike Coleman >> Cc: 2790@emacsbugs.donarmstrong.com >> >> most-positive-fixnum gives >> >> 1152921504606846975 (#o37777777777, #xffffffff) > > That sounds like a bug: the decimal representation is like I'd expect > on a 64-bit machine, but the octal and hex representations are like on > a 32-bit machine. Strange... 22.1 had a buggy format that truncated numbers to the range of int. I fixed some bugs here for 22.2. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 16:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123817125128488 (code B ref -1); Fri, 27 Mar 2009 16:35:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Mar 2009 16:27:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2RGRSUV028480 for ; Fri, 27 Mar 2009 09:27:29 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnEtz-0002uM-PU for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 12:27:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnEtz-0002tt-6t for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 12:27:27 -0400 Received: from [199.232.76.173] (port=49656 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnEtz-0002ti-2R for bug-gnu-emacs@gnu.org; Fri, 27 Mar 2009 12:27:27 -0400 Received: from ey-out-1920.google.com ([74.125.78.147]:55842) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LnEtx-0002nj-KP; Fri, 27 Mar 2009 12:27:25 -0400 Received: by ey-out-1920.google.com with SMTP id 13so225672eye.24 for ; Fri, 27 Mar 2009 09:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=q3zbJ5Z8/Ub7oxvOJXNpmNaumzibm1+ds5ceHmVeWYA=; b=nVNNsejwC5WvsrHCQeUWIfO0wSDc+DdNedDRJuxymOFVlnUHm0XK321pD2CRKUVMvc TJEvg2ECEJDfQ+om0FQ0vTTzXtLXM9Uev32leny7/++JyNVU5yBOwjR7kP9qYlrFeDw7 CVt0oV2Ma18n2Nkh3a0V0LTi9pzSFpw0QJtnM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tmuC+63eY5jyh2aK3wmM6J1EHjF8uFqRPaAVncwkyR4k+Ja6Odu/N6A6PrfKtxZHID IyxobDSOESSOJ+c2l6+8TpF4WnApkcD734Jl5ICkJwy53K+kvPSe6IjBY1xWPdBiCKsg 9iVFd8s5zSW52sd2aIxn40GKjlrOIuUcSiNrQ= MIME-Version: 1.0 Received: by 10.210.57.12 with SMTP id f12mr257262eba.10.1238171243873; Fri, 27 Mar 2009 09:27:23 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> Date: Fri, 27 Mar 2009 11:27:23 -0500 Message-ID: <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> From: Mike Coleman To: rms@gnu.org Cc: 2790@debbugs.gnu.org, bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) On Thu, Mar 26, 2009 at 11:59 PM, Richard M Stallman wrote: > Please try the pretest of Emacs 23 and see if it works. > See ftp://alpha.gnu.org/gnu/emacs/pretest/. > > And please don't call it a "Linux box". =A0The system running in it > is more GNU than Linux, so please call it a GNU/Linux box. > (See http://www.gnu.org/gnu/gnu-linux-faq.html.) > Okay, tried it (emacs-23.0.91), but no luck. Looks very nice, but finding that large file produced the same error. The value of 'most-positive-fixnum' prints correctly, though (which is different). The smallest file that produces the error has 536870912 bytes, exactly 512MB. (This is via binary search, so assumes that there is just one transition from "will" to "won't" as filesize increases.) On an unrelated note, I did see the following message in the 'make install' output, for what it's worth: gzip: ./quail/hangul3.el: No such file or directory It didn't stop the install, though. Mike P.S. Re GNU/Linux, yes, preaching to the choir. Thanks for the reminder. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 16:35:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123817138328591 (code B ref 2790); Fri, 27 Mar 2009 16:35:09 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 16:29:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2RGTdR1028579 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 09:29:41 -0700 Received: by ey-out-2122.google.com with SMTP id 25so254667eya.13 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 09:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pyOayFeVkypxoQnbbehzzeytiThFa0THMXUFmJOWGds=; b=YBhqSO9EuNywVVtjpUDOkMGEcXWAyYPkOSiMqdrlnEoiXnjhRaOFZYsJY2yd/8cJ2N rFvD72L81vjEr7wWKkhO5D2kb2+ilnUgXqWzqP8LcpdNa11d0OunIjmA0YlrWvP87JWp YZ2Ebvy0+HkAU9ZVCaDlwRzWbFLGx5Q9Bl9EQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ri8WaDno+UYb2ROJwMOA6rFRqGYddw4h9TWOKxSKIINrX1ZH567jn2jAzmzc/hiZL9 p1ycbV19h2uRe1i/oWgNvgmwJ8OaqIJvlY/Vw1bO7+3WvkwHWxlNLdS1K6y7RmoZ9zuk O+JQ+4exqcYK3yUI0rPZsqp+QCPwR7lkKdPmM= MIME-Version: 1.0 Received: by 10.210.45.17 with SMTP id s17mr1725390ebs.74.1238171379012; Fri, 27 Mar 2009 09:29:39 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903261401o57b49b58p372c24d947911c4d@mail.gmail.com> <3c6c07c20903261433v66b63eev2f4e9b74da666524@mail.gmail.com> <3c6c07c20903261739i25c214d4s76ea5c126e168e18@mail.gmail.com> Date: Fri, 27 Mar 2009 11:29:38 -0500 Message-ID: <3c6c07c20903270929s29cb7d8av96aaa5a7ea8af13e@mail.gmail.com> From: Mike Coleman To: Stefan Monnier Cc: 2790@debbugs.gnu.org, Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Mar 26, 2009 at 10:08 PM, Stefan Monnier wrote: > I.e. first try it with the head the trunk of the CVS repository. > Then report here with the problems you encounter. Is there anything newer than 23.0.91 worth trying? Or, alternatively, since the trigger file is 512MB, can someone with the head built verify that this bombs there as well? Mike From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 27 Mar 2009 17:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123817586716656 (code B ref 2790); Fri, 27 Mar 2009 17:50:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 27 Mar 2009 17:44:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=GMAIL,HAS_BUG_NUMBER, RCVD_IN_NIX1 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2RHiNfS016649 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 10:44:24 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KH600F00EDN3800@i_mtaout2.012.net.il> for 2790@emacsbugs.donarmstrong.com; Fri, 27 Mar 2009 20:44:07 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH600HG2ELJ7WQ0@i_mtaout2.012.net.il>; Fri, 27 Mar 2009 20:44:07 +0300 (IDT) Date: Fri, 27 Mar 2009 20:42:04 +0300 From: Eli Zaretskii In-reply-to: <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-012-Sender: halo1@inter.net.il To: Mike Coleman , 2790@debbugs.gnu.org Cc: rms@gnu.org Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> > Date: Fri, 27 Mar 2009 11:27:23 -0500 > From: Mike Coleman > Cc: 2790@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org > > On Thu, Mar 26, 2009 at 11:59 PM, Richard M Stallman wrote: > > Please try the pretest of Emacs 23 and see if it works. > > See ftp://alpha.gnu.org/gnu/emacs/pretest/. > > > > And please don't call it a "Linux box".  The system running in it > > is more GNU than Linux, so please call it a GNU/Linux box. > > (See http://www.gnu.org/gnu/gnu-linux-faq.html.) > > > > Okay, tried it (emacs-23.0.91), but no luck. Looks very nice, but > finding that large file produced the same error. The value of > 'most-positive-fixnum' prints correctly, though (which is different). > > The smallest file that produces the error has 536870912 bytes, exactly > 512MB. This means that the bug is still there in the current code base. Thanks for testing. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 02:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123820638525002 (code B ref 2790); Sat, 28 Mar 2009 02:20:02 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 02:13:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2S2D1d8024993 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 19:13:02 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgEAAQlzUlFxIfy/2dsb2JhbACBUc5Vg3cGhHU X-IronPort-AV: E=Sophos;i="4.38,436,1233550800"; d="scan'208";a="35797682" Received: from 69-196-135-242.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 27 Mar 2009 22:12:55 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1B1588682; Fri, 27 Mar 2009 22:12:54 -0400 (EDT) From: Stefan Monnier To: Mike Coleman Cc: 2790@debbugs.gnu.org Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Fri, 27 Mar 2009 22:12:54 -0400 In-Reply-To: <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> (Mike Coleman's message of "Fri, 27 Mar 2009 11:27:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Okay, tried it (emacs-23.0.91), but no luck. Looks very nice, but > finding that large file produced the same error. The value of > 'most-positive-fixnum' prints correctly, though (which is different). There was an incorrect check that limited the size to INT_MAX/4 (i.e. 512MB for systems where ints are 32bit). I've removed this check in the CVS code (see patch below). I am now able to open an 800MB file with this check removed. OTOH with a 2GB file, I got some unjustified "memory exhausted" error, but I haven't tracked it down yet. Note also that when you open large files, it's worthwhile to use find-file-literally to be sure it's opened in unibyte mode; otherwise it gets decoded which takes ages. Also if the file has many lines (my 800MB file was made up by copying a C file many times, so it had millions of lines), turning off line-number-mode is is needed to recover responsiveness when navigating near the end of the buffer. Stefan Index: src/fileio.c =================================================================== RCS file: /sources/emacs/emacs/src/fileio.c,v retrieving revision 1.651 retrieving revision 1.652 diff -u -r1.651 -r1.652 --- src/fileio.c 24 Mar 2009 14:14:54 -0000 1.651 +++ src/fileio.c 28 Mar 2009 02:06:08 -0000 1.652 @@ -3300,7 +3300,11 @@ overflow. The calculations below double the file size twice, so check that it can be multiplied by 4 safely. */ if (XINT (end) != st.st_size - || st.st_size > INT_MAX / 4) + /* Actually, it should test either INT_MAX or LONG_MAX + depending on which one is used for EMACS_INT. But in + any case, in practice, this test is redundant with the + one above. + || st.st_size > INT_MAX / 4 */) error ("Maximum buffer size exceeded"); /* The file size returned from stat may be zero, but data From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 05:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123821786410505 (code B ref 2790); Sat, 28 Mar 2009 05:30:02 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 05:24:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f178.google.com (mail-ew0-f178.google.com [209.85.219.178]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2S5OKgN010490 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 22:24:22 -0700 Received: by ewy26 with SMTP id 26so1486153ewy.1 for <2790@emacsbugs.donarmstrong.com>; Fri, 27 Mar 2009 22:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qAT/0eV+M0YzKbtTmv3C7oFaly2xu/ms7FysU3kqF+Q=; b=G/mr8SCynSQvI3xeEP23nngwLcgWjCqQv8EAj2/1NFmGbfDCvc46iHQw5OTA3ZJEJo dEB4pdYOCUfN7kxnSeclEeLSfQFtNj7Rn8PFE4kHihnoB+0wrLcryHo+Z6Y9J0ygDDVl rBe3VldGhLn6O2gHdDeNlJMnqoCRCLDD4wLXQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KYneBivsPk1VgfoPVASRDJCrQomzuVpCEh/ytKSNSCtSMhHGZw9oAvFYLflCquTiaA pdLmoaJKAMLXMmSsdMCh1iGDoHWfIq8jzwOFMfsP7lQQvjXBBznQxVSaOFE2SWo/3mQU goKmgSmFpPeNnh9nv0K1IZiScJPAel49tcIj8= MIME-Version: 1.0 Received: by 10.210.87.14 with SMTP id k14mr2251763ebb.0.1238217855129; Fri, 27 Mar 2009 22:24:15 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sat, 28 Mar 2009 00:24:15 -0500 Message-ID: <3c6c07c20903272224l584aa304r6481b756137ab017@mail.gmail.com> From: Mike Coleman To: Stefan Monnier Cc: 2790@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm not quite sure I'm following this. Are you running your experiments with a 64-bit emacs, or a 32-bit one? On Fri, Mar 27, 2009 at 9:12 PM, Stefan Monnier wrote: >> Okay, tried it (emacs-23.0.91), but no luck. =A0Looks very nice, but >> finding that large file produced the same error. =A0The value of >> 'most-positive-fixnum' prints correctly, though (which is different). > > There was an incorrect check that limited the size to INT_MAX/4 > (i.e. 512MB for systems where ints are 32bit). =A0I've removed this check > in the CVS code (see patch below). =A0I am now able to open an 800MB file > with this check removed. =A0OTOH with a 2GB file, I got some unjustified > "memory exhausted" error, but I haven't tracked it down yet. =A0Note also > that when you open large files, it's worthwhile to use > find-file-literally to be sure it's opened in unibyte mode; otherwise > it gets decoded which takes ages. =A0Also if the file has many lines (my > 800MB file was made up by copying a C file many times, so it had > millions of lines), turning off line-number-mode is is needed to recover > responsiveness when navigating near the end of the buffer. > > > =A0 =A0 =A0 =A0Stefan > > > Index: src/fileio.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /sources/emacs/emacs/src/fileio.c,v > retrieving revision 1.651 > retrieving revision 1.652 > diff -u -r1.651 -r1.652 > --- src/fileio.c =A0 =A0 =A0 =A024 Mar 2009 14:14:54 -0000 =A0 =A0 =A01.6= 51 > +++ src/fileio.c =A0 =A0 =A0 =A028 Mar 2009 02:06:08 -0000 =A0 =A0 =A01.6= 52 > @@ -3300,7 +3300,11 @@ > =A0 =A0 =A0 =A0 =A0 =A0 overflow. =A0The calculations below double the fi= le size > =A0 =A0 =A0 =A0 =A0 =A0 twice, so check that it can be multiplied by 4 sa= fely. =A0*/ > =A0 =A0 =A0 =A0 =A0if (XINT (end) !=3D st.st_size > - =A0 =A0 =A0 =A0 =A0 =A0 || st.st_size > INT_MAX / 4) > + =A0 =A0 =A0 =A0 =A0 =A0 /* Actually, it should test either INT_MAX or L= ONG_MAX > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0depending on which one is used for EMACS= _INT. =A0But in > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0any case, in practice, this test is redu= ndant with the > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0one above. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|| st.st_size > INT_MAX / 4 */) > =A0 =A0 =A0 =A0 =A0 =A0error ("Maximum buffer size exceeded"); > > =A0 =A0 =A0 =A0 =A0/* The file size returned from stat may be zero, but d= ata > From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 08:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123823006932127 (code B ref 2790); Sat, 28 Mar 2009 08:55:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 08:47:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2S8ljed032120 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 01:47:46 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KH700A00KESGE00@i_mtaout2.012.net.il> for 2790@emacsbugs.donarmstrong.com; Sat, 28 Mar 2009 11:47:39 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH700KITKFDJX20@i_mtaout2.012.net.il>; Sat, 28 Mar 2009 11:47:38 +0300 (IDT) Date: Sat, 28 Mar 2009 11:45:35 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier , 2790@debbugs.gnu.org Cc: tutufan@gmail.com Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> > From: Stefan Monnier > Date: Fri, 27 Mar 2009 22:12:54 -0400 > Cc: 2790@emacsbugs.donarmstrong.com > > > Okay, tried it (emacs-23.0.91), but no luck. Looks very nice, but > > finding that large file produced the same error. The value of > > 'most-positive-fixnum' prints correctly, though (which is different). > > There was an incorrect check that limited the size to INT_MAX/4 > (i.e. 512MB for systems where ints are 32bit). I've removed this check > in the CVS code (see patch below). The patch below does this: > - || st.st_size > INT_MAX / 4) > + /* Actually, it should test either INT_MAX or LONG_MAX > + depending on which one is used for EMACS_INT. But in > + any case, in practice, this test is redundant with the > + one above. > + || st.st_size > INT_MAX / 4 */) > error ("Maximum buffer size exceeded"); But what about the commentary immediately preceding the modified code: The calculations below double the file size twice, so check that it can be multiplied by 4 safely. I'm not sure to which calculations it alludes, but if you think they are no longer relevant, please remove that part of the comment, otherwise we will wonder in a couple of years why the code does not do what the comment says it should. Personally, I would change INT_MAX/4 to LONG_MAX/4, because that does TRT on all supported platforms, 32-bit and 64-bit alike (long and int are both 32-bit wide on 32-bit machines). That would avoid too radical changes during a pretest, which is a Good Thing, IMO. > Note also that when you open large files, it's worthwhile to use > find-file-literally to be sure it's opened in unibyte mode; > otherwise it gets decoded which takes ages. Perhaps the prompt we pop for large file should suggest visiting literally as an option. > Also if the file has many lines (my > 800MB file was made up by copying a C file many times, so it had > millions of lines), turning off line-number-mode is is needed to recover > responsiveness when navigating near the end of the buffer. Perhaps we should make the default value of line-number-display-limit non-nil, at least in 64-bit builds. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 11:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12382387377159 (code B ref 2790); Sat, 28 Mar 2009 11:20:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 11:12:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SBCDZw007151 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 04:12:15 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id C029E1C15640; Sat, 28 Mar 2009 12:14:52 +0100 (CET) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id AEE8A90329; Sat, 28 Mar 2009 12:12:07 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id vRWRk1oDuxpM; Sat, 28 Mar 2009 12:12:06 +0100 (CET) Received: from igel.home (DSL01.83.171.168.87.ip-pool.NEFkom.net [83.171.168.87]) by mail.mnet-online.de (Postfix) with ESMTP; Sat, 28 Mar 2009 12:12:06 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id E8E1E10DE19; Sat, 28 Mar 2009 12:12:04 +0100 (CET) From: Andreas Schwab To: Eli Zaretskii Cc: 2790@debbugs.gnu.org, Stefan Monnier , tutufan@gmail.com References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-Yow: I just had my entire INTESTINAL TRACT coated with TEFLON! Date: Sat, 28 Mar 2009 12:12:04 +0100 In-Reply-To: (Eli Zaretskii's message of "Sat, 28 Mar 2009 11:45:35 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Eli Zaretskii writes: > Personally, I would change INT_MAX/4 to LONG_MAX/4, This is wrong, see also make_gap_larger. The range for buffer positions is still limited by the range of int. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 12:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123824195622128 (code B ref 2790); Sat, 28 Mar 2009 12:10:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 12:05:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SC5qeC022111 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 05:05:53 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KH700D00TGPFQ00@i_mtaout2.012.net.il> for 2790@emacsbugs.donarmstrong.com; Sat, 28 Mar 2009 15:05:46 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH700K9PTLLJXG0@i_mtaout2.012.net.il>; Sat, 28 Mar 2009 15:05:46 +0300 (IDT) Date: Sat, 28 Mar 2009 15:03:43 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 2790@debbugs.gnu.org, monnier@iro.umontreal.ca, tutufan@gmail.com Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> > From: Andreas Schwab > Cc: 2790@emacsbugs.donarmstrong.com, Stefan Monnier , tutufan@gmail.com > Date: Sat, 28 Mar 2009 12:12:04 +0100 > > Eli Zaretskii writes: > > > Personally, I would change INT_MAX/4 to LONG_MAX/4, > > This is wrong, see also make_gap_larger. The range for buffer positions > is still limited by the range of int. Then that's another bug waiting to happen, isn't it? Buffer positions should be limited by EMACS_INT, not by int, right? From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 12:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123824403631357 (code B ref 2790); Sat, 28 Mar 2009 12:45:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 12:40:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SCeXgH031351 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 05:40:34 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id BE6C51C14E67; Sat, 28 Mar 2009 13:43:12 +0100 (CET) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 89F8D903B1; Sat, 28 Mar 2009 13:40:27 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id oNJD0fF0ZHz9; Sat, 28 Mar 2009 13:40:26 +0100 (CET) Received: from igel.home (DSL01.83.171.168.87.ip-pool.NEFkom.net [83.171.168.87]) by mail.mnet-online.de (Postfix) with ESMTP; Sat, 28 Mar 2009 13:40:26 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id E96C810DE19; Sat, 28 Mar 2009 13:40:24 +0100 (CET) From: Andreas Schwab To: Eli Zaretskii Cc: 2790@debbugs.gnu.org, monnier@iro.umontreal.ca, tutufan@gmail.com References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-Yow: I hope you millionaires are having fun! I just invested half your life savings in yeast!! Date: Sat, 28 Mar 2009 13:40:24 +0100 In-Reply-To: (Eli Zaretskii's message of "Sat, 28 Mar 2009 15:03:43 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Eli Zaretskii writes: > Then that's another bug waiting to happen, isn't it? Buffer positions > should be limited by EMACS_INT, not by int, right? If you fix _every_ use of int for buffer positions. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Eli Zaretskii , 2790@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 14:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123824850317404 (code B ref 2790); Sat, 28 Mar 2009 14:00:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 28 Mar 2009 13:55:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SDsw96017367 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 06:54:59 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KH700M00YH4G600@i_mtaout2.012.net.il> for 2790@emacsbugs.donarmstrong.com; Sat, 28 Mar 2009 16:54:51 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.23.114]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KH7002Z3YNE53P2@i_mtaout2.012.net.il>; Sat, 28 Mar 2009 16:54:51 +0300 (IDT) Date: Sat, 28 Mar 2009 16:52:48 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Cc: 2790@debbugs.gnu.org, monnier@iro.umontreal.ca, tutufan@gmail.com Message-id: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> > From: Andreas Schwab > Cc: 2790@emacsbugs.donarmstrong.com, monnier@iro.umontreal.ca, tutufan@gmail.com > Date: Sat, 28 Mar 2009 13:40:24 +0100 > > Eli Zaretskii writes: > > > Then that's another bug waiting to happen, isn't it? Buffer positions > > should be limited by EMACS_INT, not by int, right? > > If you fix _every_ use of int for buffer positions. Right. And in the meantime, we should probably tell Emacs on 64-bit platforms is capable of visiting files up to 2GB large. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: rms@gnu.org, 2790@debbugs.gnu.org Resent-From: Richard M Stallman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 15:25:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12382534626891 (code B ref -1); Sat, 28 Mar 2009 15:25:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 28 Mar 2009 15:17:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SFHdB7006885 for ; Sat, 28 Mar 2009 08:17:40 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnaHz-0002ph-5c for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 11:17:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnaHu-0002i3-5r for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 11:17:38 -0400 Received: from [199.232.76.173] (port=55827 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnaHt-0002hr-TX for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 11:17:33 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:54745) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LnaHt-0004IU-Np for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 11:17:33 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LnaHt-00064L-ID; Sat, 28 Mar 2009 11:17:33 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: Richard M Stallman To: Mike Coleman , 2790@debbugs.gnu.org CC: 2790@debbugs.gnu.org, bug-gnu-emacs@gnu.org In-reply-to: <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> (message from Mike Coleman on Fri, 27 Mar 2009 11:27:23 -0500) References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Message-Id: Date: Sat, 28 Mar 2009 11:17:33 -0400 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) The smallest file that produces the error has 536870912 bytes, exactly 512MB. (This is via binary search, so assumes that there is just one transition from "will" to "won't" as filesize increases.) It looks like you're simply hitting the limit on buffer size. But I suspect there is a bug here, because it sounds like you can visit a file whose size is bigger than most-positive-fixnum. If you do that, what value do you get for (point-max)? Is it negative? I think it will be, and that we need to restrict the buffer size to be no more than most-positive-fixnum. From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Mike Coleman , 2790@debbugs.gnu.org Resent-From: Mike Coleman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Mar 2009 16:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123825769024588 (code B ref -1); Sat, 28 Mar 2009 16:35:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 28 Mar 2009 16:28:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2SGS6Wl024577 for ; Sat, 28 Mar 2009 09:28:08 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnbOA-0005Fp-8d for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 12:28:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnbO5-0005AW-FC for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 12:28:05 -0400 Received: from [199.232.76.173] (port=43173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnbO4-0005A4-TT for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2009 12:28:00 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:60523) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LnbO3-0003WF-Kk; Sat, 28 Mar 2009 12:27:59 -0400 Received: by ewy4 with SMTP id 4so1551095ewy.42 for ; Sat, 28 Mar 2009 09:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oOLjOdCGg33szW7iuAvd/lizMn/RUWEiyKDM2vC/mrw=; b=LO0JeNkTr36c0RBO8LCmri45zJQZnMRp7W+7ucm4KylKnM2nLjjPTit71mTuVnyOU1 P5gRXmC6+rH1PLdl781Z8QgR47mqSmId7QrseS24l6aKNrodFmjALojxQqQ5R5cKWMyl TFHG8jpIxg7IMTXuYoqimOXE0QfaQxvQB5qy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IIzaDyb7v9E4RlY2lhbt7uOJW7OFHtkY3mDVsPAi2/AoCAHD1RKj42ugjeV50RjZaY beOHY8izN3XnzzSmCipr8x/ttV5pDnTYgKAF4xoTX/sHYFMur48A/SBdd0ykx3B5KrWc UdLLJGS7qYIbD6x/gPWK9djcb0pddqFbuf5tQ= MIME-Version: 1.0 Received: by 10.210.11.17 with SMTP id 17mr2629193ebk.25.1238257677780; Sat, 28 Mar 2009 09:27:57 -0700 (PDT) In-Reply-To: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sat, 28 Mar 2009 11:27:57 -0500 Message-ID: <3c6c07c20903280927k4b08ce52m3368a2ed6a9996f8@mail.gmail.com> From: Mike Coleman To: rms@gnu.org Cc: 2790@debbugs.gnu.org, bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) On Sat, Mar 28, 2009 at 10:17 AM, Richard M Stallman wrote: > =A0 =A0The smallest file that produces the error has 536870912 bytes, exa= ctly > =A0 =A0512MB. =A0(This is via binary search, so assumes that there is jus= t one > =A0 =A0transition from "will" to "won't" as filesize increases.) > > It looks like you're simply hitting the limit on buffer size. > > But I suspect there is a bug here, because it sounds like > you can visit a file whose size is bigger than most-positive-fixnum. > If you do that, what value do you get for (point-max)? > Is it negative? =A0I think it will be, and that we need > to restrict the buffer size to be no more than most-positive-fixnum. It appears to me that visiting a file larger than 512MB is simply failing, with the given error message about the max buffer size. (Note that 512MB is much, much smaller than most-positive-fixnum (=3D=3D 2^64).) So, to me, it seems like the behavior is "correct", if emacs only promises to handle files as large as 512MB (on 64-bit platforms). Nonetheless, I'd like it to handle much larger files. Is there any real reason not to just turn every (32-bit) "int" into a (64-bit) "long" on 64-bit platforms? Mike From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: rms@gnu.org, 2790@debbugs.gnu.org Resent-From: Richard M Stallman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 02:25:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123829296310932 (code B ref 2790); Sun, 29 Mar 2009 02:25:05 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 02:16:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2T2G0ke010926 for <2790@emacsbugs.donarmstrong.com>; Sat, 28 Mar 2009 19:16:01 -0700 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LnkZ5-0003sv-Q9; Sat, 28 Mar 2009 22:15:59 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: Richard M Stallman To: Stefan Monnier , 2790@debbugs.gnu.org CC: tutufan@gmail.com, 2790@debbugs.gnu.org In-reply-to: (message from Stefan Monnier on Fri, 27 Mar 2009 22:12:54 -0400) References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Message-Id: Date: Sat, 28 Mar 2009 22:15:59 -0400 There was an incorrect check that limited the size to INT_MAX/4 (i.e. 512MB for systems where ints are 32bit). I've removed this check in the CVS code (see patch below). I am now able to open an 800MB file with this check removed. After you visit such a file, what does (point-max) return? Perhaps you're talking only about 64-bit systems? From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 20:05:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123835679117576 (code B ref 2790); Sun, 29 Mar 2009 20:05:06 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 19:59:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2TJxlW9017566 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 12:59:49 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAB9wz0lFxIfy/2dsb2JhbACBUcUhg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,442,1233550800"; d="scan'208";a="35901254" Received: from 69-196-135-242.dsl.teksavvy.com (HELO ceviche.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2009 15:59:42 -0400 Received: by ceviche.home (Postfix, from userid 20848) id B77A2706A6; Sun, 29 Mar 2009 15:59:41 -0400 (EDT) From: Stefan Monnier To: Mike Coleman Cc: 2790@debbugs.gnu.org Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> <3c6c07c20903272224l584aa304r6481b756137ab017@mail.gmail.com> Date: Sun, 29 Mar 2009 15:59:41 -0400 In-Reply-To: <3c6c07c20903272224l584aa304r6481b756137ab017@mail.gmail.com> (Mike Coleman's message of "Sat, 28 Mar 2009 00:24:15 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I'm not quite sure I'm following this. Are you running your > experiments with a 64-bit emacs, or a 32-bit one? 64bit, of course. Otherwise the 256MB limit kicks in. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123835743921891 (code B ref 2790); Sun, 29 Mar 2009 20:20:02 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 20:10:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2TKAWmG021885 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 13:10:33 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAHZyz0lFxIfy/2dsb2JhbACBUMUmg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,442,1233550800"; d="scan'208";a="35901509" Received: from 69-196-135-242.dsl.teksavvy.com (HELO ceviche.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2009 16:10:26 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 36964706A9; Sun, 29 Mar 2009 16:10:26 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Cc: 2790@debbugs.gnu.org, tutufan@gmail.com Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sun, 29 Mar 2009 16:10:26 -0400 In-Reply-To: (Eli Zaretskii's message of "Sat, 28 Mar 2009 11:45:35 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The patch below does this: >> - || st.st_size > INT_MAX / 4) >> + /* Actually, it should test either INT_MAX or LONG_MAX >> + depending on which one is used for EMACS_INT. But in >> + any case, in practice, this test is redundant with the >> + one above. >> + || st.st_size > INT_MAX / 4 */) >> error ("Maximum buffer size exceeded"); > But what about the commentary immediately preceding the modified code: > The calculations below double the file size twice, so check that it > can be multiplied by 4 safely. The patch also adds a comment explaining that this test is actually redundant in practice (and it will stay redundant as long as our Lisp integers have at least 2bits of tag). > I'm not sure to which calculations it alludes, but if you think they > are no longer relevant, please remove that part of the comment, > otherwise we will wonder in a couple of years why the code does not do > what the comment says it should. Since I'm not sure either, I kept the comment and added another one explaining why I removed the check anyway. > Personally, I would change INT_MAX/4 to LONG_MAX/4, because that does > TRT on all supported platforms, 32-bit and 64-bit alike (long and int > are both 32-bit wide on 32-bit machines). That would avoid too > radical changes during a pretest, which is a Good Thing, IMO. In that case I'd rather do the check more directly, e.g.: (((EMACS_INT)st.st_size)*4)/4 == st.st_size But as explained, I'm not convinced the check is needed/useful. >> Note also that when you open large files, it's worthwhile to use >> find-file-literally to be sure it's opened in unibyte mode; >> otherwise it gets decoded which takes ages. > Perhaps the prompt we pop for large file should suggest visiting > literally as an option. Yes, that's also what I was thinking. Together with having different "large-threshold" values for unibyte and multibyte. >> Also if the file has many lines (my >> 800MB file was made up by copying a C file many times, so it had >> millions of lines), turning off line-number-mode is is needed to recover >> responsiveness when navigating near the end of the buffer. > Perhaps we should make the default value of line-number-display-limit > non-nil, at least in 64-bit builds. Agreed. We could even do something better: - do it more efficiently (once computed for a page, it should be able to update the count instantly when paging up/down, whereas it seems not to always be able to do that). - when computing really would take a lot of time (e.g. we're far from the closest known line position), display ??? and postpone the actual computation to some future idle time. In any case, large file introduce lots of problem. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 20:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123835762421917 (code B ref 2790); Sun, 29 Mar 2009 20:20:04 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 20:13:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2TKDfGS021909 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 13:13:42 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAK1zz0lFxIfy/2dsb2JhbACBUcUhg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,442,1233550800"; d="scan'208";a="35901558" Received: from 69-196-135-242.dsl.teksavvy.com (HELO ceviche.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2009 16:13:35 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 6C7EA706A6; Sun, 29 Mar 2009 16:13:35 -0400 (EDT) From: Stefan Monnier To: Andreas Schwab Cc: Eli Zaretskii , 2790@debbugs.gnu.org, tutufan@gmail.com Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sun, 29 Mar 2009 16:13:35 -0400 In-Reply-To: (Andreas Schwab's message of "Sat, 28 Mar 2009 12:12:04 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Personally, I would change INT_MAX/4 to LONG_MAX/4, > This is wrong, see also make_gap_larger. The range for buffer positions > is still limited by the range of int. Every place where that is the case is a bug (and yes, there are many still). We should remove the check in make_gap_larger, BTW. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 20:20:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123835770522213 (code B ref 2790); Sun, 29 Mar 2009 20:20:05 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 20:15:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2TKF1KS021937 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 13:15:03 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAK1zz0lFxIfy/2dsb2JhbACBUcUhg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,442,1233550800"; d="scan'208";a="35901584" Received: from 69-196-135-242.dsl.teksavvy.com (HELO ceviche.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2009 16:14:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 34A3F706A6; Sun, 29 Mar 2009 16:14:56 -0400 (EDT) From: Stefan Monnier To: rms@gnu.org Cc: 2790@debbugs.gnu.org, tutufan@gmail.com Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sun, 29 Mar 2009 16:14:56 -0400 In-Reply-To: (Richard M. Stallman's message of "Sat, 28 Mar 2009 22:15:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > There was an incorrect check that limited the size to INT_MAX/4 > (i.e. 512MB for systems where ints are 32bit). I've removed this check > in the CVS code (see patch below). I am now able to open an 800MB file > with this check removed. > After you visit such a file, what does (point-max) return? It returns the correct value. > Perhaps you're talking only about 64-bit systems? Yes, all this discussion is in this context. For 32bit systems, the 256MB limit kicks in long before we hit any of those problems. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 29 Mar 2009 20:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123835945429149 (code B ref 2790); Sun, 29 Mar 2009 20:50:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 29 Mar 2009 20:44:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2TKi9Ol029143 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 13:44:11 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 9F9791C15331; Sun, 29 Mar 2009 22:46:55 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 0FF29901A7; Sun, 29 Mar 2009 22:44:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id s1m82ESm13Ev; Sun, 29 Mar 2009 22:44:02 +0200 (CEST) Received: from igel.home (DSL01.83.171.146.241.ip-pool.NEFkom.net [83.171.146.241]) by mail.mnet-online.de (Postfix) with ESMTP; Sun, 29 Mar 2009 22:44:02 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 1E87010DE1F; Sun, 29 Mar 2009 22:44:02 +0200 (CEST) From: Andreas Schwab To: Stefan Monnier Cc: 2790@debbugs.gnu.org, Eli Zaretskii , tutufan@gmail.com References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-Yow: All of life is a blur of Republicans and meat! Date: Sun, 29 Mar 2009 22:44:01 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 29 Mar 2009 16:10:26 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > In that case I'd rather do the check more directly, e.g.: > > (((EMACS_INT)st.st_size)*4)/4 == st.st_size That will reintroduce the buggy reliance on undefined integer overflow. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 30 Mar 2009 01:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123837476027521 (code B ref 2790); Mon, 30 Mar 2009 01:05:05 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 30 Mar 2009 00:59:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2U0xGH5027515 for <2790@emacsbugs.donarmstrong.com>; Sun, 29 Mar 2009 17:59:17 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAHi2z0lFxIfy/2dsb2JhbACBT8UAg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,443,1233550800"; d="scan'208";a="35907637" Received: from 69-196-135-242.dsl.teksavvy.com (HELO ceviche.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2009 20:59:09 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 5873970043; Sun, 29 Mar 2009 20:59:09 -0400 (EDT) From: Stefan Monnier To: Andreas Schwab Cc: 2790@debbugs.gnu.org, Eli Zaretskii , tutufan@gmail.com Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Sun, 29 Mar 2009 20:59:09 -0400 In-Reply-To: (Andreas Schwab's message of "Sun, 29 Mar 2009 22:44:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> In that case I'd rather do the check more directly, e.g.: >> (((EMACS_INT)st.st_size)*4)/4 == st.st_size > That will reintroduce the buggy reliance on undefined integer overflow. I do not know what you're referring to. If you're referring to the fact that (((EMACS_INT)st.st_size)*4) may overflow, then I'm not sure what problem you're envisaging: do you think that in some cases where it overflows, (((EMACS_INT)st.st_size)*4)/4 may still be equal to st.st_size (I can't think of any meningful semantics for overflow that would give me that property)? Or are you concerned about trapping overflow semantics (I've never seen it in use and doubt Emacs would work in such a system)? Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 30 Mar 2009 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.12384004974939 (code B ref 2790); Mon, 30 Mar 2009 08:15:02 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 30 Mar 2009 08:08:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2U88Dsj004933 for <2790@emacsbugs.donarmstrong.com>; Mon, 30 Mar 2009 01:08:15 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 61F731C01F9F; Mon, 30 Mar 2009 10:08:10 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id BB69490069; Mon, 30 Mar 2009 10:08:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id 2hmEQ2OWbuT8; Mon, 30 Mar 2009 10:08:11 +0200 (CEST) Received: from igel.home (DSL01.83.171.178.148.ip-pool.NEFkom.net [83.171.178.148]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 30 Mar 2009 10:08:11 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 6872410DE22; Mon, 30 Mar 2009 10:08:10 +0200 (CEST) From: Andreas Schwab To: Stefan Monnier Cc: 2790@debbugs.gnu.org, Eli Zaretskii , tutufan@gmail.com References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-Yow: I have the power to HALT PRODUCTION on all TEENAGE SEX COMEDIES!! Date: Mon, 30 Mar 2009 10:08:10 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 29 Mar 2009 20:59:09 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > I do not know what you're referring to. If you're referring to the fact > that (((EMACS_INT)st.st_size)*4) may overflow, then I'm not sure what > problem you're envisaging: The compiler can (and does) optimize on the fact that overflow does not occur, thus the operation x*4/4 becomes a no-op. Never ever do overflow checking after the fact. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Stefan Monnier , 2790@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 30 Mar 2009 13:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123841807813541 (code B ref 2790); Mon, 30 Mar 2009 13:10:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 30 Mar 2009 13:01:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2UD19d6013534 for <2790@emacsbugs.donarmstrong.com>; Mon, 30 Mar 2009 06:01:11 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAC9f0ElFxIfy/2dsb2JhbACBUchXg3oGhHc X-IronPort-AV: E=Sophos;i="4.38,446,1233550800"; d="scan'208";a="35920828" Received: from 69-196-135-242.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.242]) by ironport2-out.teksavvy.com with ESMTP; 30 Mar 2009 09:01:03 -0400 Received: by pastel.home (Postfix, from userid 20848) id D87008B42; Mon, 30 Mar 2009 09:01:01 -0400 (EDT) From: Stefan Monnier To: Andreas Schwab Cc: 2790@debbugs.gnu.org, Eli Zaretskii , tutufan@gmail.com Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> Date: Mon, 30 Mar 2009 09:01:01 -0400 In-Reply-To: (Andreas Schwab's message of "Mon, 30 Mar 2009 10:08:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The compiler can (and does) optimize on the fact that overflow does not > occur, thus the operation x*4/4 becomes a no-op. No way!? Hmm... yes, I guess it's within the allowed semantics, indeed. We could prevent optimization by going through a volatile var, of course. So in the end, I still prefer the current solution of removing the check altogether. Stefan From unknown Mon Aug 18 11:15:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box Reply-To: Andreas Schwab , 2790@debbugs.gnu.org Resent-From: Andreas Schwab Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 30 Mar 2009 13:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2790 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2790-submit@emacsbugs.donarmstrong.com id=B2790.123841935019159 (code B ref 2790); Mon, 30 Mar 2009 13:30:03 +0000 Received: (at 2790) by emacsbugs.donarmstrong.com; 30 Mar 2009 13:22:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2UDMJYf019153 for <2790@emacsbugs.donarmstrong.com>; Mon, 30 Mar 2009 06:22:21 -0700 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 747FF1C00046; Mon, 30 Mar 2009 15:22:16 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id D1770901D9; Mon, 30 Mar 2009 15:22:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id Qp7kHSbBZ5PU; Mon, 30 Mar 2009 15:22:17 +0200 (CEST) Received: from igel.home (DSL01.83.171.178.148.ip-pool.NEFkom.net [83.171.178.148]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 30 Mar 2009 15:22:17 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 82B3610DE24; Mon, 30 Mar 2009 15:22:17 +0200 (CEST) From: Andreas Schwab To: Stefan Monnier Cc: 2790@debbugs.gnu.org, Eli Zaretskii , tutufan@gmail.com References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> <3c6c07c20903270927y5292e32as857233aa1fd75737@mail.gmail.com> X-Yow: An Italian is COMBING his hair in suburban DES MOINES! Date: Mon, 30 Mar 2009 15:22:17 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 30 Mar 2009 09:01:01 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > We could prevent optimization by going through a volatile var, > of course. That would mean it would still depend on an undefined operation. The right way to check for overflow is to check against the limit beforehand. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Mon Aug 18 11:15:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2011 22:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Coleman Cc: 2790@debbugs.gnu.org Received: via spool by 2790-submit@debbugs.gnu.org id=B2790.131577971531202 (code B ref 2790); Sun, 11 Sep 2011 22:22:02 +0000 Received: (at 2790) by debbugs.gnu.org; 11 Sep 2011 22:21:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2sPS-000879-5S for submit@debbugs.gnu.org; Sun, 11 Sep 2011 18:21:54 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2sPQ-000871-Am for 2790@debbugs.gnu.org; Sun, 11 Sep 2011 18:21:52 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R2sLA-0002eH-75; Mon, 12 Sep 2011 00:17:28 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> (Mike Coleman's message of "Thu, 26 Mar 2009 10:50:35 -0500") Date: Mon, 12 Sep 2011 00:10:05 +0200 Message-ID: References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Alasdair Roberts's _Spoils_: "Under No Enchantment (But My Own)" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R2sLA-0002eH-75 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316384248.33337@3n57UT4S5WmSutLadedi1Q X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Mike Coleman writes: > I'm trying to open a large (between 4GB and 5GB) file on a x86-64 > Linux box that has 64GB of RAM. I'm getting the error message > "Maximum buffer size exceeded". A lot of work has gone into making Emacs 24 usable for visiting buffers that are larger than 2GB. But I'm not sure if Emacs 24 is quite there yet. Has anybody tried this lately? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Mon Aug 18 11:15:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mike Coleman Subject: bug#2790: closed (Re: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box) Message-ID: References: <8339g2xy7v.fsf@gnu.org> <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> X-Gnu-PR-Message: they-closed 2790 X-Gnu-PR-Package: emacs Reply-To: 2790@debbugs.gnu.org Date: Mon, 12 Sep 2011 03:04:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1315796641-15075-1" This is a multi-part message in MIME format... ------------=_1315796641-15075-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 2790@debbugs.gnu.org. --=20 2790: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D2790 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1315796641-15075-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2790-done) by debbugs.gnu.org; 12 Sep 2011 03:03:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2woB-0003ug-Gr for submit@debbugs.gnu.org; Sun, 11 Sep 2011 23:03:43 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2wo8-0003uX-8T for 2790-done@debbugs.gnu.org; Sun, 11 Sep 2011 23:03:41 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LRE00A002WK7I00@a-mtaout20.012.net.il> for 2790-done@debbugs.gnu.org; Mon, 12 Sep 2011 05:59:18 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.126.9.62]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LRE0091X2YRS980@a-mtaout20.012.net.il>; Mon, 12 Sep 2011 05:59:18 +0300 (IDT) Date: Mon, 12 Sep 2011 05:59:16 +0300 From: Eli Zaretskii Subject: Re: bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box In-reply-to: X-012-Sender: halo1@inter.net.il To: Lars Magne Ingebrigtsen Message-id: <8339g2xy7v.fsf@gnu.org> References: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 2790-done Cc: 2790-done@debbugs.gnu.org, tutufan@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Lars Magne Ingebrigtsen > Date: Mon, 12 Sep 2011 00:10:05 +0200 > Cc: 2790@debbugs.gnu.org > > Mike Coleman writes: > > > I'm trying to open a large (between 4GB and 5GB) file on a x86-64 > > Linux box that has 64GB of RAM. I'm getting the error message > > "Maximum buffer size exceeded". > > A lot of work has gone into making Emacs 24 usable for visiting buffers > that are larger than 2GB. But I'm not sure if Emacs 24 is quite there > yet. > > Has anybody tried this lately? We are there. Before I removed the 2GB limit hat was artificially put there to avoid crashes, I actually visited a file larger than 2GB (I think it was 3GB and change) and made sure I can move in it, edit it, and save it. So I'm closing this bug. ------------=_1315796641-15075-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 26 Mar 2009 15:50:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2QFohJJ017210 for ; Thu, 26 Mar 2009 08:50:45 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lmrqt-00064n-GR for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lmrqn-00061u-Up for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:42 -0400 Received: from [199.232.76.173] (port=51189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lmrqn-00061l-Rf for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:37 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:40356) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lmrqn-0006qW-FA for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2009 11:50:37 -0400 Received: by ewy4 with SMTP id 4so685337ewy.42 for ; Thu, 26 Mar 2009 08:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=cvdaT7CCumxyNut08Z/BPWzfpE412yG3QSqFPPb6vf4=; b=ULZ/Jizr4ajUNQbZF3jI7SVdy3phj15yv+TsDvF39FPR464IK52hdqBvEUXPLBEV6N lbst9RRQxycIN6NxmYxPTG7WDEDEViqQRVSkxAC7PCQ1bhYlph6AKSbn+7jr51SpRSm0 JXwq8WLyjzzbHwr5xFYxkAwCoT3DWoZFDR99E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=YfNngwYp0u78lbYUjspEsAnAR+9HFHXXGugLGhnZhx9hZKkg4iSzEka8sPLBoyOl25 j7mu3G3G6rb/6S58rCH7gTUBjGX+P90mNSNWcaNRilFNbngBaL1uPOm9ujU2Q2vQ3mWu UJRpJc6K57Ovl4mNPfxD8oBP/Y2xyGDGnZ0pg= MIME-Version: 1.0 Received: by 10.210.35.5 with SMTP id i5mr779715ebi.88.1238082635637; Thu, 26 Mar 2009 08:50:35 -0700 (PDT) Date: Thu, 26 Mar 2009 10:50:35 -0500 Message-ID: <3c6c07c20903260850r180e942dscb2c61d1096793f8@mail.gmail.com> Subject: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit Linux box From: Mike Coleman To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) I'm trying to open a large (between 4GB and 5GB) file on a x86-64 Linux box that has 64GB of RAM. I'm getting the error message "Maximum buffer size exceeded". I'm able to create 32GB strings in Python on this box, so I don't believe it's a ulimit problem or anything like that. The contents of /proc/cpuinfo say that the CPU has 48 virtual bits. I'm guessing that emacs uses maybe six bits or so for overhead, but that doesn't seem like enough to be causing my problem. Given the error message, it seems like emacs probably has an internal idea of a maximum buffer size, but apropos doesn't turn up anything. I'm sure this has been discussed and I've tried to find these discussions, but I don't seem to be able to track down the current thinking on this subject. Is this a know limitation or a bug? Can someone who knows provide a quick summary? Thanks, Mike ------------=_1315796641-15075-1--