Mercurial > vim
comparison src/proto/hashtab.pro @ 31231:684e6dfa2fba v9.0.0949
patch 9.0.0949: crash when unletting a variable while listing variables
Commit: https://github.com/vim/vim/commit/ef2c325f5e3c437b722bb96bf369ba2a5c541163
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 25 16:31:51 2022 +0000
patch 9.0.0949: crash when unletting a variable while listing variables
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 25 Nov 2022 17:45:04 +0100 |
parents | 34966be2e856 |
children |
comparison
equal
deleted
inserted
replaced
31230:e93800d75da2 | 31231:684e6dfa2fba |
---|---|
1 /* hashtab.c */ | 1 /* hashtab.c */ |
2 void hash_init(hashtab_T *ht); | 2 void hash_init(hashtab_T *ht); |
3 int check_hashtab_frozen(hashtab_T *ht, char *command); | |
3 void hash_clear(hashtab_T *ht); | 4 void hash_clear(hashtab_T *ht); |
4 void hash_clear_all(hashtab_T *ht, int off); | 5 void hash_clear_all(hashtab_T *ht, int off); |
5 hashitem_T *hash_find(hashtab_T *ht, char_u *key); | 6 hashitem_T *hash_find(hashtab_T *ht, char_u *key); |
6 hashitem_T *hash_lookup(hashtab_T *ht, char_u *key, hash_T hash); | 7 hashitem_T *hash_lookup(hashtab_T *ht, char_u *key, hash_T hash); |
7 void hash_debug_results(void); | 8 void hash_debug_results(void); |
8 int hash_add(hashtab_T *ht, char_u *key); | 9 int hash_add(hashtab_T *ht, char_u *key, char *command); |
9 int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); | 10 int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); |
10 void hash_remove(hashtab_T *ht, hashitem_T *hi); | 11 int hash_remove(hashtab_T *ht, hashitem_T *hi, char *command); |
11 void hash_lock(hashtab_T *ht); | 12 void hash_lock(hashtab_T *ht); |
12 void hash_lock_size(hashtab_T *ht, int size); | 13 void hash_lock_size(hashtab_T *ht, int size); |
13 void hash_unlock(hashtab_T *ht); | 14 void hash_unlock(hashtab_T *ht); |
14 hash_T hash_hash(char_u *key); | 15 hash_T hash_hash(char_u *key); |
15 /* vim: set ft=c : */ | 16 /* vim: set ft=c : */ |