Vim has 32-bitlimits; annoying on really large files and 64-bit machine

Bug #1374898 reported by Kevin O'Gorman
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)

Bug Description

I have a program that I'm debugging. It generates enormous log files which I need to peruse. I use vim as the tool of choice ordinarily, but vim stops loading the text when it reaches line 2147483647. That sounds familiar.

It gives no hint of what's wrong, so I tried several times. Then I noticed the line number of the last line it would show.

This makes vim useless for the purpose.
I regard the limit as an implementation limit which I hope you will extend. I regard the failure to report as a bug which ought to be fixed. I hope you agree.

 - On a 64-bit machine it would be nice if that were a 64-bit long long.
 - On any machine it would be nice if vim noticed it had failed and reported that fact.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: vim-gtk 2:7.4.052-1ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-35.62-generic
Uname: Linux 3.13.0-35-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.4
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Sep 27 19:56:34 2014
InstallationDate: Installed on 2014-08-11 (47 days ago)
InstallationMedia: Xubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140723)
SourcePackage: vim
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kevin O'Gorman (kogorman-pacbell) wrote :
James McCoy (jamessan)
Changed in vim (Ubuntu):
status: New → Confirmed
Revision history for this message
James McCoy (jamessan) wrote :

Just to test this out, I created a 4.7G file of just '\n' and I see exactly the behavior described. I then tried a simple change (attached, based on 7.4.728) to have Vim use LONG_MAX for MAXLNUM rather than the hard-coded value. Now Vim didn't stop loading the file partway through, but it did get killed by the OOM killer after taking up 14G of RAM.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lnum-long.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for providing a patch for this bug report. This particular package is synchronized with Debian so it would be quite helpful if you were to forward the patch to the Debian bug tracker. You can learn more about how to use the Debian bug tracker at After you've forwarded the bug report and patch please add a bug watch, following the procedure at, so we can track the progress of the upstream bug report.

Changed in vim (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.