Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 1 | " Some tests, that used to crash Vim |
Christian Brabandt | eb380b9 | 2025-07-07 20:53:55 +0200 | [diff] [blame] | 2 | source util/screendump.vim |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 3 | |
| 4 | CheckScreendump |
| 5 | |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 6 | " Run the command in terminal and wait for it to complete via notification |
| 7 | func s:RunCommandAndWait(buf, cmd) |
| 8 | call term_sendkeys(a:buf, a:cmd .. "; printf '" .. TermNotifyParentCmd(v:false) .. "'\<cr>") |
| 9 | call WaitForChildNotification() |
| 10 | endfunc |
| 11 | |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 12 | func Test_crash1() |
Christian Brabandt | d2a08ba | 2023-09-05 07:45:04 +0200 | [diff] [blame] | 13 | CheckNotBSD |
Philip H | 1690ec6 | 2023-09-06 20:20:07 +0200 | [diff] [blame] | 14 | CheckExecutable dash |
Christian Brabandt | d2a08ba | 2023-09-05 07:45:04 +0200 | [diff] [blame] | 15 | |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 16 | " The following used to crash Vim |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 17 | let opts = #{cmd: 'sh'} |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 18 | let vim = GetVimProg() |
| 19 | |
Christian Brabandt | fc68299 | 2023-09-03 20:20:52 +0200 | [diff] [blame] | 20 | let buf = RunVimInTerminal('sh', opts) |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 21 | |
| 22 | let file = 'crash/poc_huaf1' |
| 23 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
| 24 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 25 | call s:RunCommandAndWait(buf, args .. |
| 26 | \ ' && echo "crash 1: [OK]" > X_crash1_result.txt') |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 27 | |
| 28 | let file = 'crash/poc_huaf2' |
| 29 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 30 | call s:RunCommandAndWait(buf, args .. |
| 31 | \ ' && echo "crash 2: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 32 | |
| 33 | let file = 'crash/poc_huaf3' |
| 34 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 35 | call s:RunCommandAndWait(buf, args .. |
| 36 | \ ' && echo "crash 3: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 37 | |
Christian Brabandt | fc68299 | 2023-09-03 20:20:52 +0200 | [diff] [blame] | 38 | let file = 'crash/bt_quickfix_poc' |
| 39 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 40 | call s:RunCommandAndWait(buf, args .. |
| 41 | \ ' && echo "crash 4: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | fc68299 | 2023-09-03 20:20:52 +0200 | [diff] [blame] | 42 | " clean up |
| 43 | call delete('Xerr') |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 44 | |
Christian Brabandt | ee9166e | 2023-09-03 21:24:33 +0200 | [diff] [blame] | 45 | let file = 'crash/poc_tagfunc.vim' |
| 46 | let args = printf(cmn_args, vim, file) |
Christian Brabandt | f6d28fe | 2023-09-05 20:18:06 +0200 | [diff] [blame] | 47 | " using || because this poc causes vim to exit with exitstatus != 0 |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 48 | call s:RunCommandAndWait(buf, args .. |
| 49 | \ ' || echo "crash 5: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | ee9166e | 2023-09-03 21:24:33 +0200 | [diff] [blame] | 50 | |
Christian Brabandt | ee9166e | 2023-09-03 21:24:33 +0200 | [diff] [blame] | 51 | |
Christian Brabandt | 6e60cf4 | 2023-09-03 21:43:46 +0200 | [diff] [blame] | 52 | let file = 'crash/bt_quickfix1_poc' |
| 53 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 54 | call s:RunCommandAndWait(buf, args .. |
| 55 | \ ' && echo "crash 6: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | 6e60cf4 | 2023-09-03 21:43:46 +0200 | [diff] [blame] | 56 | " clean up |
| 57 | call delete('X') |
Christian Brabandt | 6e60cf4 | 2023-09-03 21:43:46 +0200 | [diff] [blame] | 58 | |
Christian Brabandt | f6d28fe | 2023-09-05 20:18:06 +0200 | [diff] [blame] | 59 | let file = 'crash/vim_regsub_both_poc' |
| 60 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 61 | call s:RunCommandAndWait(buf, args .. |
| 62 | \ ' && echo "crash 7: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | f6d28fe | 2023-09-05 20:18:06 +0200 | [diff] [blame] | 63 | |
Christian Brabandt | 3bd7fa1 | 2023-10-02 20:59:08 +0200 | [diff] [blame] | 64 | let file = 'crash/vim_msg_trunc_poc' |
| 65 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 66 | call s:RunCommandAndWait(buf, args .. |
| 67 | \ ' || echo "crash 8: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | 3bd7fa1 | 2023-10-02 20:59:08 +0200 | [diff] [blame] | 68 | |
Christian Brabandt | 20d161a | 2023-10-05 22:08:30 +0200 | [diff] [blame] | 69 | let file = 'crash/crash_scrollbar' |
| 70 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 71 | call s:RunCommandAndWait(buf, args .. |
| 72 | \ ' && echo "crash 9: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | 20d161a | 2023-10-05 22:08:30 +0200 | [diff] [blame] | 73 | |
Christian Brabandt | 41e6f7d | 2023-10-11 21:08:13 +0200 | [diff] [blame] | 74 | let file = 'crash/editing_arg_idx_POC_1' |
| 75 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 76 | call s:RunCommandAndWait(buf, args .. |
| 77 | \ ' || echo "crash 10: [OK]" >> X_crash1_result.txt') |
Christian Brabandt | 41e6f7d | 2023-10-11 21:08:13 +0200 | [diff] [blame] | 78 | call delete('Xerr') |
| 79 | call delete('@') |
| 80 | |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 81 | " clean up |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 82 | exe buf .. "bw!" |
| 83 | |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 84 | sp X_crash1_result.txt |
Christian Brabandt | fc68299 | 2023-09-03 20:20:52 +0200 | [diff] [blame] | 85 | |
| 86 | let expected = [ |
| 87 | \ 'crash 1: [OK]', |
| 88 | \ 'crash 2: [OK]', |
| 89 | \ 'crash 3: [OK]', |
| 90 | \ 'crash 4: [OK]', |
Christian Brabandt | ee9166e | 2023-09-03 21:24:33 +0200 | [diff] [blame] | 91 | \ 'crash 5: [OK]', |
Christian Brabandt | 6e60cf4 | 2023-09-03 21:43:46 +0200 | [diff] [blame] | 92 | \ 'crash 6: [OK]', |
Christian Brabandt | f6d28fe | 2023-09-05 20:18:06 +0200 | [diff] [blame] | 93 | \ 'crash 7: [OK]', |
Christian Brabandt | 3bd7fa1 | 2023-10-02 20:59:08 +0200 | [diff] [blame] | 94 | \ 'crash 8: [OK]', |
Christian Brabandt | 20d161a | 2023-10-05 22:08:30 +0200 | [diff] [blame] | 95 | \ 'crash 9: [OK]', |
Christian Brabandt | 41e6f7d | 2023-10-11 21:08:13 +0200 | [diff] [blame] | 96 | \ 'crash 10: [OK]', |
Christian Brabandt | fc68299 | 2023-09-03 20:20:52 +0200 | [diff] [blame] | 97 | \ ] |
| 98 | |
| 99 | call assert_equal(expected, getline(1, '$')) |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 100 | bw! |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 101 | |
Christian Brabandt | db510ca | 2023-09-03 09:23:12 +0200 | [diff] [blame] | 102 | call delete('X_crash1_result.txt') |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 103 | endfunc |
| 104 | |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 105 | func Test_crash1_2() |
| 106 | CheckNotBSD |
| 107 | CheckExecutable dash |
| 108 | |
| 109 | " The following used to crash Vim |
| 110 | let opts = #{cmd: 'sh'} |
| 111 | let vim = GetVimProg() |
Christian Brabandt | abfa13e | 2023-11-30 11:32:18 +0100 | [diff] [blame] | 112 | let result = 'X_crash1_2_result.txt' |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 113 | |
| 114 | let buf = RunVimInTerminal('sh', opts) |
| 115 | |
| 116 | let file = 'crash/poc1' |
| 117 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
| 118 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 119 | call s:RunCommandAndWait(buf, args .. |
| 120 | \ ' && echo "crash 1: [OK]" > '.. result) |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 121 | |
Christian Brabandt | eec0c2b | 2023-11-28 22:03:48 +0100 | [diff] [blame] | 122 | let file = 'crash/poc_win_enter_ext' |
| 123 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
| 124 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 125 | call s:RunCommandAndWait(buf, args .. |
| 126 | \ ' && echo "crash 2: [OK]" >> '.. result) |
Christian Brabandt | eec0c2b | 2023-11-28 22:03:48 +0100 | [diff] [blame] | 127 | |
Christian Brabandt | 0fb375a | 2023-11-29 10:23:39 +0100 | [diff] [blame] | 128 | let file = 'crash/poc_suggest_trie_walk' |
| 129 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
| 130 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 131 | call s:RunCommandAndWait(buf, args .. |
| 132 | \ ' && echo "crash 3: [OK]" >> '.. result) |
Christian Brabandt | 0fb375a | 2023-11-29 10:23:39 +0100 | [diff] [blame] | 133 | |
Christian Brabandt | b39b240 | 2023-11-29 11:34:05 +0100 | [diff] [blame] | 134 | let file = 'crash/poc_did_set_langmap' |
| 135 | let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" |
| 136 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 137 | call s:RunCommandAndWait(buf, args .. |
| 138 | \ ' ; echo "crash 4: [OK]" >> '.. result) |
Christian Brabandt | b39b240 | 2023-11-29 11:34:05 +0100 | [diff] [blame] | 139 | |
Christian Brabandt | cacb669 | 2024-08-22 21:40:14 +0200 | [diff] [blame] | 140 | let file = 'crash/reverse_text_overflow' |
| 141 | let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" |
| 142 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 143 | call s:RunCommandAndWait(buf, args .. |
| 144 | \ ' ; echo "crash 5: [OK]" >> '.. result) |
Christian Brabandt | cacb669 | 2024-08-22 21:40:14 +0200 | [diff] [blame] | 145 | |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 146 | " clean up |
| 147 | exe buf .. "bw!" |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 148 | exe "sp " .. result |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 149 | let expected = [ |
| 150 | \ 'crash 1: [OK]', |
Christian Brabandt | eec0c2b | 2023-11-28 22:03:48 +0100 | [diff] [blame] | 151 | \ 'crash 2: [OK]', |
Christian Brabandt | 0fb375a | 2023-11-29 10:23:39 +0100 | [diff] [blame] | 152 | \ 'crash 3: [OK]', |
Christian Brabandt | b39b240 | 2023-11-29 11:34:05 +0100 | [diff] [blame] | 153 | \ 'crash 4: [OK]', |
Christian Brabandt | cacb669 | 2024-08-22 21:40:14 +0200 | [diff] [blame] | 154 | \ 'crash 5: [OK]', |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 155 | \ ] |
| 156 | |
| 157 | call assert_equal(expected, getline(1, '$')) |
| 158 | bw! |
Christian Brabandt | 25aabc2 | 2023-11-14 19:31:34 +0100 | [diff] [blame] | 159 | call delete(result) |
| 160 | endfunc |
| 161 | |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 162 | " This test just runs various scripts, that caused issues before. |
| 163 | " We are not really asserting anything here, it's just important |
| 164 | " that ASAN does not detect any issues. |
| 165 | func Test_crash1_3() |
| 166 | let vim = GetVimProg() |
| 167 | let buf = RunVimInTerminal('sh', #{cmd: 'sh'}) |
| 168 | |
| 169 | let file = 'crash/poc_ex_substitute' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 170 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 171 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 172 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 173 | |
| 174 | let file = 'crash/poc_uaf_exec_instructions' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 175 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 176 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 177 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 178 | |
Christian Brabandt | 0f28791 | 2023-12-11 17:53:25 +0100 | [diff] [blame] | 179 | let file = 'crash/poc_uaf_check_argument_types' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 180 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | 0f28791 | 2023-12-11 17:53:25 +0100 | [diff] [blame] | 181 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 182 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 0f28791 | 2023-12-11 17:53:25 +0100 | [diff] [blame] | 183 | |
Christian Brabandt | 8a0bbe7 | 2024-08-01 20:16:51 +0200 | [diff] [blame] | 184 | let file = 'crash/double_free' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 185 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | 8a0bbe7 | 2024-08-01 20:16:51 +0200 | [diff] [blame] | 186 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 187 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 8a0bbe7 | 2024-08-01 20:16:51 +0200 | [diff] [blame] | 188 | |
Christian Brabandt | b29f4ab | 2024-08-01 22:10:28 +0200 | [diff] [blame] | 189 | let file = 'crash/dialog_changed_uaf' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 190 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | b29f4ab | 2024-08-01 22:10:28 +0200 | [diff] [blame] | 191 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 192 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | b29f4ab | 2024-08-01 22:10:28 +0200 | [diff] [blame] | 193 | |
Christian Brabandt | fb3f969 | 2024-08-11 20:09:17 +0200 | [diff] [blame] | 194 | let file = 'crash/nullpointer' |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 195 | let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'" |
Christian Brabandt | fb3f969 | 2024-08-11 20:09:17 +0200 | [diff] [blame] | 196 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 197 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | fb3f969 | 2024-08-11 20:09:17 +0200 | [diff] [blame] | 198 | |
Christian Brabandt | 322ba91 | 2024-08-25 21:33:03 +0200 | [diff] [blame] | 199 | let file = 'crash/heap_overflow3' |
| 200 | let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" |
| 201 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 202 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 322ba91 | 2024-08-25 21:33:03 +0200 | [diff] [blame] | 203 | |
Christian Brabandt | c9bfed2 | 2024-08-29 22:12:05 +0200 | [diff] [blame] | 204 | let file = 'crash/heap_overflow_glob2regpat' |
| 205 | let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" |
| 206 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 207 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 1c815b5 | 2024-08-28 22:08:35 +0200 | [diff] [blame] | 208 | |
Christian Brabandt | c3a02d7 | 2024-08-28 23:17:52 +0200 | [diff] [blame] | 209 | let file = 'crash/nullptr_regexp_nfa' |
| 210 | let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" |
| 211 | let args = printf(cmn_args, vim, file) |
Yee Cheng Chin | e70587d | 2025-02-13 20:55:45 +0100 | [diff] [blame] | 212 | call s:RunCommandAndWait(buf, args) |
Christian Brabandt | 9d1bed5 | 2025-01-20 22:55:57 +0100 | [diff] [blame] | 213 | |
Christian Brabandt | 5dd41d4 | 2023-12-04 22:52:23 +0100 | [diff] [blame] | 214 | " clean up |
| 215 | exe buf .. "bw!" |
| 216 | bw! |
| 217 | endfunc |
| 218 | |
Christian Brabandt | ced2c73 | 2023-09-02 21:15:52 +0200 | [diff] [blame] | 219 | func Test_crash2() |
Drew Vogel | ea67ba7 | 2025-05-07 22:05:17 +0200 | [diff] [blame] | 220 | CheckScreendump |
Christian Brabandt | ced2c73 | 2023-09-02 21:15:52 +0200 | [diff] [blame] | 221 | " The following used to crash Vim |
| 222 | let opts = #{wait_for_ruler: 0, rows: 20} |
| 223 | let args = ' -u NONE -i NONE -n -e -s -S ' |
| 224 | let buf = RunVimInTerminal(args .. ' crash/vim_regsub_both', opts) |
| 225 | call VerifyScreenDump(buf, 'Test_crash_01', {}) |
| 226 | exe buf .. "bw!" |
| 227 | endfunc |
| 228 | |
zeertzjq | d56c451 | 2024-08-26 18:45:37 +0200 | [diff] [blame] | 229 | func TearDown() |
| 230 | " That file is created at Test_crash1_3() by dialog_changed_uaf |
| 231 | " but cleaning up in that test doesn't remove it. Let's try again at |
Christian Brabandt | cd83173 | 2024-08-24 17:34:19 +0200 | [diff] [blame] | 232 | " the end of this test script |
| 233 | call delete('Untitled') |
| 234 | endfunc |
| 235 | |
Christian Brabandt | e1dc9a6 | 2023-09-02 14:40:13 +0200 | [diff] [blame] | 236 | " vim: shiftwidth=2 sts=2 expandtab |