summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Corallo <acorallo@gnu.org>2024-10-01 18:15:02 +0200
committerAndrea Corallo <acorallo@gnu.org>2024-10-01 18:30:37 +0200
commit372ce6adbf39c5b9ec92e103abe70af872085119 (patch)
treea624b055da644bf016494f868bc5ec771f9d90aa
parent3e92f952aa15ff3dd3f9a8523646252dcb1dc412 (diff)
* Don't iterate over an hash table while modifyiong it in comp.HEADmaster
* lisp/emacs-lisp/comp.el: Don't iterate over the hash values directly as 'comp--add-cond-cstrs-target-block' can modify the hash content.
-rw-r--r--lisp/emacs-lisp/comp.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index f1c8f02ebc3..342212f5185 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1974,7 +1974,11 @@ TARGET-BB-SYM is the symbol name of the target block."
(defun comp--add-cond-cstrs-simple ()
"`comp--add-cstrs' worker function for each selected function."
(cl-loop
- for b being each hash-value of (comp-func-blocks comp-func)
+ ;; Don't iterate over hash values directly as
+ ;; `comp--add-cond-cstrs-target-block' can modify the hash table
+ ;; content.
+ for b in (cl-loop for b being each hash-value of (comp-func-blocks comp-func)
+ collect b)
do
(cl-loop
named in-the-basic-block