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)
diff --git a/src/syntax.c b/src/syntax.c
index 468dee0..6570e9e 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -4339,7 +4339,7 @@
if (kp_prev == NULL)
{
if (kp_next == NULL)
- hash_remove(ht, hi);
+ hash_remove(ht, hi, "syntax clear keyword");
else
hi->hi_key = KE2HIKEY(kp_next);
}