This patch partially addresses bug #1768652. It doesn't check start1 and end1 to determine if the bounded sequence is proper, so instead of an error, a warning is shown.
--------------------------------
From e71e769bad2608522bd122bd644e37674a2912be Mon Sep 17 00:00:00 2001
From: Nathaniel Berch <
nath...@desktopxpressions.com>
Date: Sat, 12 May 2018 03:40:18 -0400
Subject: [PATCH] Add improper list check to SEARCH transform
---
src/compiler/seqtran.lisp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp
index 24ab87577..20785ddd9 100644
--- a/src/compiler/seqtran.lisp
+++ b/src/compiler/seqtran.lisp
@@ -1273,6 +1273,13 @@
(deftransform search ((pattern text &key start1 start2 end1 end2 test test-not
key from-end)
((constant-arg sequence) * &rest *))
+ ;;; FIXME: This does not check if the bounded sequence
+ ;;; specified by start1 to end1 is proper.
+ (let ((pattern (lvar-value pattern)))
+ (when (and (listp pattern)
+ (not (sb!impl::proper-list-p pattern)))
+ (compiler-warn "~S is not a proper sequence." pattern)
+ (give-up-ir1-transform)))
(if key
(give-up-ir1-transform)
(let* ((pattern (lvar-value pattern))
--
2.11.0