Dominique wrote:

> afl-fuzz found this case which causes the
> internal error E315 in latest vim-8.0.760
> and older:
> 
> $ vim -u NONE -c 'h|0f|ps.'
> 
> It gives:
> 
> "help.txt" [readonly] 225 lines, 8437 characters
> "[No Name]" [Not edited][readonly] line 1 of 227 --0%-- col 1
> Error detected while processing command line:
> E315: ml_get: invalid lnum: 2
> E315: ml_get: invalid lnum: 3
> E315: ml_get: invalid lnum: 3
> Press ENTER or type command to continue
> 
> Stack with gdb:
> 
> $ gdb --args ./vim -u NONE -c 'h|0f|ps.'
> 
> (gdb) br memline.c:2455
> Breakpoint 1 at 0x8100400: file memline.c, line 2455.
> 
> (gdb) run
> Breakpoint 1, ml_get_buf (buf=0x836eb88, lnum=2, will_change=0) at
> memline.c:2455
> 2455            IEMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
> 
> (gdb) bt
> #0  ml_get_buf (buf=0x836eb88, lnum=2, will_change=0) at memline.c:2455
> #1  0x08108d48 in plines_win_nofold (wp=0x836d4d0, lnum=2) at misc1.c:2015
> #2  0x08108e1a in plines_win_nofill (wp=0x836d4d0, lnum=2,
> winheight=1) at misc1.c:1998
> #3  0x08108e59 in plines_win (wp=0x836d4d0, lnum=2, winheight=1) at 
> misc1.c:1965
> #4  0x0811c1b7 in curs_rows (wp=0x836d4d0) at move.c:740
> #5  0x0811e045 in curs_columns (may_scroll=1) at move.c:951
> #6  0x0811e2bc in validate_cursor () at move.c:642
> #7  0x081994e1 in find_pattern_in_path (ptr=0x832c27a ".", dir=0,
> len=1, whole=1,
>     skip_comments=1, type=1, count=0, action=2, start_lnum=1, end_lnum=227)
>     at search.c:5459
> #8  0x080b2f6b in ex_findpat (eap=0xbfffeb54) at ex_docmd.c:10489
> #9  0x080b3066 in ex_psearch (eap=0xbfffeb54) at ex_docmd.c:10433
> #10 0x080b9c95 in do_one_cmd (cookie=0x0, fgetline=0x0,
> cstack=0xbfffec54, sourcing=1,
>     cmdlinep=0xbfffeae8) at ex_docmd.c:2951
> #11 do_cmdline (cmdline=0xbffff319 "h|0f|ps.", fgetline=0x0,
> cookie=0x0, flags=11)
>     at ex_docmd.c:1089
> #12 0x080bd952 in do_cmdline_cmd (cmd=0xbffff319 "h|0f|ps.") at ex_docmd.c:689
> #13 0x08227c82 in exe_commands (parmp=0x8313500 <params>) at main.c:2960
> #14 vim_main2 () at main.c:805
> #15 0x0805661b in main (argc=5, argv=0xbffff114) at main.c:419

Thanks, I'll fix it.

-- 
hundred-and-one symptoms of being an internet addict:
222. You send more than 20 personal e-mails a day.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui