summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp-cstr.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-12-23 10:46:33 +0100
committerAndrea Corallo <akrl@sdf.org>2020-12-23 10:58:42 +0100
commitfd8dd75a71eef796ba8fb1d2604fd615bebaae42 (patch)
treea1d0e3d81d71e18fee0baa768719d56b2a922ac9 /lisp/emacs-lisp/comp-cstr.el
parent2a22fa8b68d18b83b0a20be66b9123454bf7b6e5 (diff)
downloademacs-fd8dd75a71eef796ba8fb1d2604fd615bebaae42.tar.gz
emacs-fd8dd75a71eef796ba8fb1d2604fd615bebaae42.tar.bz2
emacs-fd8dd75a71eef796ba8fb1d2604fd615bebaae42.zip
Make input constraints into memoization hash immutable (bug#45376)
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1) (comp-cstr-intersection): Copy input before soting it into the memoization hash table.
Diffstat (limited to 'lisp/emacs-lisp/comp-cstr.el')
-rw-r--r--lisp/emacs-lisp/comp-cstr.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index aaeb9cf3e9b..480d15616a0 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -507,7 +507,7 @@ DST is returned."
(comp-cstr-ctxt-union-1-mem-no-range comp-ctxt)))
(res (or (gethash srcs mem-h)
(puthash
- srcs
+ (mapcar #'comp-cstr-copy srcs)
(apply #'comp-cstr-union-1-no-mem range srcs)
mem-h))))
(setf (typeset dst) (typeset res)
@@ -676,7 +676,7 @@ DST is returned."
(let* ((mem-h (comp-cstr-ctxt-intersection-mem comp-ctxt))
(res (or (gethash srcs mem-h)
(puthash
- srcs
+ (mapcar #'comp-cstr-copy srcs)
(apply #'comp-cstr-intersection-no-mem srcs)
mem-h))))
(setf (typeset dst) (typeset res)