From fd8dd75a71eef796ba8fb1d2604fd615bebaae42 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 23 Dec 2020 10:46:33 +0100 Subject: 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. --- lisp/emacs-lisp/comp-cstr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/comp-cstr.el') 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) -- cgit v1.2.3