annotate src/testdir/test77a.in @ 19930:80e663e91e1b v8.2.0521

patch 8.2.0521: crash when reading a blob fails Commit: https://github.com/vim/vim/commit/15352dc6ec43fd50cc3be4f4fd1ad74d5619da20 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 6 21:12:42 2020 +0200 patch 8.2.0521: crash when reading a blob fails Problem: Crash when reading a blob fails. Solution: Avoid keeping a pointer to a freed blob object. (Dominique Pelle, closes #5890) Adjust error messages.
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Apr 2020 21:15:37 +0200
parents 47a673b20e49
children e705ea6e855b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5704
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Inserts 2 million lines with consecutive integers starting from 1
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 (essentially, the output of GNU's seq 1 2000000), writes them to Xtest
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 and writes its cksum to test.out.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 up the lines the checksum would differ.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 cksum is part of POSIX and so should be available on most Unixes.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 If it isn't available then the test will be skipped.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 VMS does not have CKSUM but has a built in CHECKSUM - it should be used
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 STARTTEST
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :so small.vim
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :if !has("vms")
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : e! test.ok
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : w! test.out
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 : qa!
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :endif
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :set fileformat=unix undolevels=-1
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 ggdG
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :let i = 1
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 ggdd
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :w! Xtest.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :r !@test77a.com Xtest.
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :s/\s/ /g
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :set fileformat&
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :.w! test.out
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :qa!
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 ENDTEST
47a673b20e49 updated for version 7.4.197
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31