annotate runtime/compiler/perl.vim @ 31081:c12069d28719 v9.0.0875

patch 9.0.0875: using freed memory when executing delfunc at more prompt Commit: https://github.com/vim/vim/commit/398a26f7fcd58fbc6e2329f892edbb7479a971bb Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 13 22:13:33 2022 +0000 patch 9.0.0875: using freed memory when executing delfunc at more prompt Problem: Using freed memory when executing delfunc at the more prompt. Solution: Check function list not changed in another place. (closes https://github.com/vim/vim/issues/11437)
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Nov 2022 23:15:03 +0100
parents d1fe80fb35e6
children e1df51f68736
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
1 " Vim compiler file
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
2 " Compiler: Perl syntax checks (perl -Wc)
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
3 " Maintainer: vim-perl <vim-perl@googlegroups.com>
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
4 " Author: Christian J. Robinson <heptite@gmail.com>
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
5 " Homepage: https://github.com/vim-perl/vim-perl
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
6 " Bugs/requests: https://github.com/vim-perl/vim-perl/issues
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
7 " License: Vim License (see :help license)
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
8 " Last Change: 2021 Nov 2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if exists("current_compiler")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let current_compiler = "perl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if exists(":CompilerSet") != 2 " older Vim always used :setlocal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 command -nargs=* CompilerSet setlocal <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 let s:savecpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
22 if get(g:, 'perl_compiler_force_warnings', 1)
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
23 let s:warnopt = 'W'
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
24 else
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
25 let s:warnopt = 'w'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
28 if getline(1) =~# '-[^ ]*T'
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
29 let s:taintopt = 'T'
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
30 else
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
31 let s:taintopt = ''
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
32 endif
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
33
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2239
diff changeset
34 exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %:S'
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
35
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 CompilerSet errorformat=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \%-G%.%#had\ compilation\ errors.,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 \%-G%.%#syntax\ OK,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 \%m\ at\ %f\ line\ %l.,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 \%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 \%+C%.%#
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Explanation:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " %-G%.%#had\ compilation\ errors., - Ignore the obvious.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " %-G%.%#syntax\ OK, - Don't include the 'a-okay' message.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " %m\ at\ %f\ line\ %l., - Most errors...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " %+A%.%#\ at\ %f\ line\ %l\\,%.%#, - As above, including ', near ...'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " %+C%.%# - ... Which can be multi-line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let &cpo = s:savecpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 unlet s:savecpo