On 9/14/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 9/14/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > 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. > > [...] > > > > 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. > > > > In situation where fgets() returns NULL, find_tags() enters > > infinite loop as follows. > > Sorry, this doesn't show me where the loop actually is. Please compile > without the optimizer, otherwise code reordering confuses the debugger. > > At least tell us if Vim hangs in tag_fgets() or in find_tags().The loop is is inside find_tags(), and it procees around following line numbers: 1625 1626 1642 1647 1650 1651 1652 1653 1562 1564 1566 1576 1582 1588 1601 1603 1604 1616 1619 1621 1625 and infinite loop repeats. Look at this: gdb> print print search_info.curr_offset $2 = 5258708303049
I cannot guess where this loop first gets beyond end of file (filesize=2506), but once it gets beyond, we are missing check that search_info.*offset''s are beyond end of file ? Maybe add such check somewhere ? I don't know where to add the check. Yakov
