Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
27896:960de0084729 | 27897:2a2c0958a913 |
---|---|
6 * Do ":help credits" in Vim to see a list of people who contributed. | 6 * Do ":help credits" in Vim to see a list of people who contributed. |
7 */ | 7 */ |
8 | 8 |
9 /* | 9 /* |
10 * alloc.h: enumeration of alloc IDs. | 10 * alloc.h: enumeration of alloc IDs. |
11 * Used by test_alloc_fail() to test memory allocation failures. | |
11 * Each entry must be on exactly one line, GetAllocId() depends on that. | 12 * Each entry must be on exactly one line, GetAllocId() depends on that. |
12 */ | 13 */ |
13 typedef enum { | 14 typedef enum { |
14 aid_none = 0, | 15 aid_none = 0, |
15 aid_qf_dirname_start, | 16 aid_qf_dirname_start, |
16 aid_qf_dirname_now, | 17 aid_qf_dirname_now, |
17 aid_qf_namebuf, | 18 aid_qf_namebuf, |
18 aid_qf_module, | 19 aid_qf_module, |
19 aid_qf_errmsg, | 20 aid_qf_errmsg, |
20 aid_qf_pattern, | 21 aid_qf_pattern, |
21 aid_tagstack_items, | 22 aid_qf_efm_fmtstr, |
22 aid_tagstack_from, | 23 aid_qf_efm_fmtpart, |
23 aid_tagstack_details, | 24 aid_qf_title, |
24 aid_sign_getdefined, | 25 aid_qf_mef_name, |
25 aid_sign_getplaced, | 26 aid_qf_qfline, |
26 aid_sign_define_by_name, | 27 aid_qf_qfinfo, |
27 aid_sign_getlist, | 28 aid_qf_dirstack, |
28 aid_sign_getplaced_dict, | 29 aid_qf_multiline_pfx, |
29 aid_sign_getplaced_list, | 30 aid_qf_makecmd, |
30 aid_insert_sign, | 31 aid_qf_linebuf, |
31 aid_sign_getinfo, | 32 aid_tagstack_items, |
32 aid_last | 33 aid_tagstack_from, |
34 aid_tagstack_details, | |
35 aid_sign_getdefined, | |
36 aid_sign_getplaced, | |
37 aid_sign_define_by_name, | |
38 aid_sign_getlist, | |
39 aid_sign_getplaced_dict, | |
40 aid_sign_getplaced_list, | |
41 aid_insert_sign, | |
42 aid_sign_getinfo, | |
43 aid_last | |
33 } alloc_id_T; | 44 } alloc_id_T; |