annotate src/alloc.h @ 27897:2a2c0958a913 v8.2.4474

patch 8.2.4474: memory allocation failures not tested in quickfix code Commit: https://github.com/vim/vim/commit/5a2d4a3ecb67942d47615507a163ffcd5863c073 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Feb 26 10:31:32 2022 +0000 patch 8.2.4474: memory allocation failures not tested in quickfix code Problem: Memory allocation failures not tested in quickfix code. Solution: Add alloc IDs and tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9848)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Feb 2022 11:45:03 +0100
parents 3a99b2e6d136
children a4aad5142959
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 8269
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
7545
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 *
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 *
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 */
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 /*
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 * alloc.h: enumeration of alloc IDs.
27897
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
11 * Used by test_alloc_fail() to test memory allocation failures.
7545
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 * Each entry must be on exactly one line, GetAllocId() depends on that.
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 */
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 typedef enum {
27897
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
15 aid_none = 0,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
16 aid_qf_dirname_start,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
17 aid_qf_dirname_now,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
18 aid_qf_namebuf,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
19 aid_qf_module,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
20 aid_qf_errmsg,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
21 aid_qf_pattern,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
22 aid_qf_efm_fmtstr,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
23 aid_qf_efm_fmtpart,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
24 aid_qf_title,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
25 aid_qf_mef_name,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
26 aid_qf_qfline,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
27 aid_qf_qfinfo,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
28 aid_qf_dirstack,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
29 aid_qf_multiline_pfx,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
30 aid_qf_makecmd,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
31 aid_qf_linebuf,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
32 aid_tagstack_items,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
33 aid_tagstack_from,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
34 aid_tagstack_details,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
35 aid_sign_getdefined,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
36 aid_sign_getplaced,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
37 aid_sign_define_by_name,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
38 aid_sign_getlist,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
39 aid_sign_getplaced_dict,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
40 aid_sign_getplaced_list,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
41 aid_insert_sign,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
42 aid_sign_getinfo,
2a2c0958a913 patch 8.2.4474: memory allocation failures not tested in quickfix code
Bram Moolenaar <Bram@vim.org>
parents: 15209
diff changeset
43 aid_last
7545
4c922651fd78 commit https://github.com/vim/vim/commit/28fb79db6b52d1154e8dc63d227673648c2fce15
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 } alloc_id_T;