Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–239 unchanged (239 lines)
240
241 let file = 'crash/nullptr_regexp_nfa'
242 let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
243 let args = printf(cmn_args, vim, file)
244 call term_sendkeys(buf, args)
245 call TermWait(buf, 50)
246
247 " clean up
248 exe buf .. "bw!"
249 bw!
250endfunc
251
252func Test_crash2()
…lines 253–287 unchanged (35 lines)

After

…lines 1–240 unchanged (240 lines)
241 let file = 'crash/nullptr_regexp_nfa'
242 let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
243 let args = printf(cmn_args, vim, file)
244 call term_sendkeys(buf, args)
245 call TermWait(buf, 50)
246
247 let file = 'crash/ex_redraw_crash'
248 let cmn_args = "%s -u NONE -i NONE -n -m -X -Z -e -s -S %s -c ':qa!'"
249 let args = printf(cmn_args, vim, file)
250 call term_sendkeys(buf, args)
251 call TermWait(buf, 150)
252
253 " clean up
254 exe buf .. "bw!"
255 bw!
256endfunc
257
…lines 258–293 unchanged (36 lines)

Before

script_file
comment "\" Some tests, that used to crash Vim"
source_statement
source "source"
filename "check.vim"
source_statement
source "source"
filename "screendump.vim"
user_command
command_name "CheckScreendump"
comment "\" Run the command in terminal and wait for it to complete vi"...
function_definition (+48 nodes collapsed)
function_definition (+465 nodes collapsed)
function_definition (+370 nodes collapsed)
comment "\" This test just runs various scripts, that caused issues be"...
comment "\" We are not really asserting anything here, it's just impor"...
comment "\" that ASAN does not detect any issues."
function_definition
function "func"
function_declaration
identifier "Test_crash1_3"
parameters
( "("
) ")"
body
let_statement
let "let"
identifier "vim"
= "="
call_expression
identifier "GetVimProg"
( "("
) ")"
let_statement
let "let"
identifier "buf"
= "="
call_expression
identifier "RunVimInTerminal"
( "("
string_literal "'sh'"
, ","
literal_dictionary
#{ "#{"
literal_key "cmd"
: ":"
string_literal "'sh'"
} "}"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_ex_substitute'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_uaf_exec_instructions'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_uaf_check_argument_types'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/double_free'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/dialog_changed_uaf'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/nullpointer'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/heap_overflow3'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/heap_overflow_glob2regpat'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/nullptr_regexp_nfa'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
comment "\" clean up"
execute_statement
execute "exe"
binary_operation
identifier "buf"
.. ".."
string_literal "\"bw!\""
unknown_builtin_statement
unknown_command_name "bw"
bang
! "!"
endfunction "endfunc"
function_definition (+62 nodes collapsed)
function_definition
function "func"
function_declaration
identifier "TearDown"
parameters
( "("
) ")"
body
comment "\" That file is created at Test_crash1_3() by dialog_changed_"...
comment "\" but cleaning up in that test doesn't remove it. Let's try "...
comment "\" the end of this test script"
call_statement
call "call"
call_expression
identifier "delete"
( "("
string_literal "'Untitled'"
) ")"
endfunction "endfunc"
function_definition (+134 nodes collapsed)
comment "\" vim: shiftwidth=2 sts=2 expandtab"

After

script_file
comment "\" Some tests, that used to crash Vim"
source_statement
source "source"
filename "check.vim"
source_statement
source "source"
filename "screendump.vim"
user_command
command_name "CheckScreendump"
comment "\" Run the command in terminal and wait for it to complete vi"...
function_definition (+48 nodes collapsed)
function_definition (+465 nodes collapsed)
function_definition (+370 nodes collapsed)
comment "\" This test just runs various scripts, that caused issues be"...
comment "\" We are not really asserting anything here, it's just impor"...
comment "\" that ASAN does not detect any issues."
function_definition
function "func"
function_declaration
identifier "Test_crash1_3"
parameters
( "("
) ")"
body
let_statement
let "let"
identifier "vim"
= "="
call_expression
identifier "GetVimProg"
( "("
) ")"
let_statement
let "let"
identifier "buf"
= "="
call_expression
identifier "RunVimInTerminal"
( "("
string_literal "'sh'"
, ","
literal_dictionary
#{ "#{"
literal_key "cmd"
: ":"
string_literal "'sh'"
} "}"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_ex_substitute'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_uaf_exec_instructions'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/poc_uaf_check_argument_types'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/double_free'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/dialog_changed_uaf'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/nullpointer'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\\<cr>\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/heap_overflow3'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/heap_overflow_glob2regpat'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/nullptr_regexp_nfa'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "50"
) ")"
let_statement
let "let"
identifier "file"
= "="
string_literal "'crash/ex_redraw_crash'"
let_statement
let "let"
identifier "cmn_args"
= "="
string_literal "\"%s -u NONE -i NONE -n -m -X -Z -e -s -S %s -c ':qa!'\""
let_statement
let "let"
identifier "args"
= "="
call_expression
identifier "printf"
( "("
identifier "cmn_args"
, ","
identifier "vim"
, ","
identifier "file"
) ")"
call_statement
call "call"
call_expression
identifier "term_sendkeys"
( "("
identifier "buf"
, ","
identifier "args"
) ")"
call_statement
call "call"
call_expression
identifier "TermWait"
( "("
identifier "buf"
, ","
integer_literal "150"
) ")"
comment "\" clean up"
execute_statement
execute "exe"
binary_operation
identifier "buf"
.. ".."
string_literal "\"bw!\""
unknown_builtin_statement
unknown_command_name "bw"
bang
! "!"
endfunction "endfunc"
function_definition (+62 nodes collapsed)
function_definition
function "func"
function_declaration
identifier "TearDown"
parameters
( "("
) ")"
body
comment "\" That file is created at Test_crash1_3() by dialog_changed_"...
comment "\" but cleaning up in that test doesn't remove it. Let's try "...
comment "\" the end of this test script"
call_statement
call "call"
call_expression
identifier "delete"
( "("
string_literal "'Untitled'"
) ")"
endfunction "endfunc"
function_definition (+134 nodes collapsed)
comment "\" vim: shiftwidth=2 sts=2 expandtab"