Yakov Lerner wrote:

> On 9/14/06, Haakon Riiser <[EMAIL PROTECTED]> wrote:
> > After recompiling Vim with -D_FILE_OFFSET_BITS=64, everything
> > involving tags break, including the help system.  Typing :h,
> > or pressing ^] to jump to a tag, causes Vim to get caught in an
> > infinite loop.
> >
> > Is there another way to get large file support that works?
> > There's no ./configure argument to enable it, so I just added
> > the above macro definition flag in CFLAGS.  The problem with
> > not having large file support is not that I need to edit files
> > larger than 2 GiB, but that ^X^F doesn't expand large files,
> > probably because stat() fails with EOVERFLOW.
> >
> > By the way, this problem was encountered on the following system:
> >
> > OS: Slackware Linux 10.2
> > Libc: 2.3.5
> > GCC: several versions: 3.3.6, 3.4.6, 4.1.1
> > Vim: several versions, including 7.0.0 and 7.0.101
> 
> I also get infinite loop when I build vim with -D_FILE_OFFSET_BITS=64
> on FedoraCode 3.
> 
> Applying 'strace -p' shows that vim is stuck searching for
> tag, see the trace below. Apparently some read() in vim
> does not have check for == 0 return value.
> 
> Yakov
> 
> [ here vim searches for tags in other file ... then ...]
> open("/home/lerner/.vim/doc/tags", O_RDONLY|O_LARGEFILE) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=2506, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7fbf000
> read(3, ":Brightness\txterm16.txt\t/*:Brigh"..., 4096) = 2506
> _llseek(3, 0, [2506], SEEK_END)         = 0
> _llseek(3, 0, [0], SEEK_SET)            = 0
> _llseek(3, 0, [0], SEEK_SET)            = 0
> read(3, ":Brightness\txterm16.txt\t/*:Brigh"..., 4096) = 2506
> read(3, "", 4096)                       = 0
> read(3, "", 4096)                       = 0
> read(3, "", 4096)                       = 0
> read(3, "", 4096)                       = 0
> read(3, "", 4096)                       = 0
> read(3, "", 4096)                       = 0
> .... infinite .........

Can you find out where in the code this happens?

I suspect the 64 bit library functions work different from the "normal"
functions.  Perhaps fgets(), since that's what is being used to read the
tags file.

-- 
Lose weight, NEVER Diet again with
                  The "Invisible Weight Loss Patch"
                                                (spam e-mail)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to