failed AVER (ZEROP (HASH-TABLE-COUNT (SB-FASL::FASL-OUTPUT-PATCH-TABLE SB-FASL:FASL-OUTPUT))) on COMPILE-FILE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
;; The sbcl version is: SBCL 1.0.29.11.debian
;; The value of *features*
;; CL-USER> *features*
;; (:SB-BSD-
;; :SB-FUTEX :SB-THREAD :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB
;; :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-
;; :IEEE-FLOATING-
;; :STACK-
;; :COMPARE-
;; :STACK-
;; :OS-PROVIDES-DLOPEN :OS-PROVIDES-PUTWC :OS-PROVIDES-
;; The output from the command line of "uname -a" is:
;; Linux meyers-laptop 2.6.31-
;; input to all-caps-
;; are lists like: (JJ ABC 4)
;; (RB XYZ 3) (VBZ XC/Z 4)
;; When the second item in the list meets a test,
;; the first item in the list should be changed to
;; NNP
;; For example:
;; CL-USER> (all-caps-
;; NIL
;; CL-USER> (all-caps-
;; (NNP XYZ 3)
;; CL-USER> (all-caps-
;; (NNP XC/Z 4)
;; CL-USER>
;; [Note the above uses lisp in SLIME, but the same thing
;; happens if I fire up lisp using sbcl from the shell]
;; There are two versions of this function below. The first version
;; is commented out, but works fine in all respects (if the commenting
;; is removed). The second version causes an error when it is compiled
;; using the "compile-file" command. It can be interpretted at the command
;; line just fine. It seems that using the function "every" to apply
;; a lambda expression to a string causes compile error, but mapping a
;; function defined using "defun" does not.
;; The error I get looks like this:
;; debugger invoked on a SB-INT:BUG in thread #<THREAD "initial thread" RUNNING {AA5E639}>:
;; failed AVER:
;; (ZEROP (HASH-TABLE-COUNT (FASL-OUTPUT-
;; This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
;; corrupted by bad user code, e.g. by an undefined Lisp operation like
;; (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe
;; Lisp code; or there might be a bug in the OS or hardware that SBCL is running
;; on.) If it seems to be a bug in SBCL itself, the maintainers would like to
;; know about it. Bug reports are welcome on the SBCL mailing lists, which you
;; can find at <http://
(defvar *language* 'english)
(defvar *unit-punctuation* '(|$| |%| |#| US$ C$ A$ $A AU$ FFr ))
(defun char2 (string index)
(and (< index (length string))
(char string index)))
(defun alpha-symbol (symbol)
(and (symbolp symbol)
(alpha-char-p (char2 (symbol-name symbol) 0))))
(defun punctuation-pos (pos)
(or (member pos '(pos pu hyph ls lst su))
(and (not (alpha-symbol pos))
(not (member pos *unit-punctuati
(member pos '(rm rs)) ;; disfluency punctuation
(and (eq pos 'ip)
(eq *language* 'english))
;; ip is disfluency punctuation for english
;; and a clausal category for chinese
))
(defun name-character (char)
(or (and (upper-case-p char)
(not (member char (list #\A #\E #\I #\O #\U))))
(member char (list #\. #\- #\/
))
)
)
;; (defun all-caps-
;; (when (and (not (member (car S) '(NN NNS NNP NNPS UH LS SYM)))
;; (not (punctuation-pos (car S)))
;; (symbolp (second S))
;; (some #'upper-case-p
;; (symbol-name (second S)))
;; (every #'name-character (symbol-name (second S)))
;; )
;; (cons 'nnp (cdr S)))
;; )
(defun all-caps-
(when (and (not (member (car S) '(NN NNS NNP NNPS UH LS SYM)))
(not (punctuation-pos (car S)))
(symbolp (second S))
(some #'upper-case-p
(symbol-name (second S)))
(every #'(lambda (char)
(or (and (upper-case-p char)
(not (member char (list #\A #\E #\I #\O #\U))))
(member char (list #\. #\- #\/
))
)
)
(symbol-name (second S)))
)
(cons 'nnp (cdr S)))
)
Changed in sbcl: | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
summary: |
- compile error when "every" applies lambda expression + failed AVER (ZEROP (HASH-TABLE-COUNT (SB-FASL::FASL-OUTPUT-PATCH-TABLE + SB-FASL:FASL-OUTPUT))) on COMPILE-FILE |
Changed in sbcl: | |
status: | Triaged → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
fizzies <email address hidden> writes:
status confirmed
important high
tag compiler
done
> ;; The sbcl version is: SBCL 1.0.29.11.debian
Confirmed in sbcl 1.0.34. Compiling a file containing
(defun all-caps- no-vowels- fix (S)
(every #'(lambda (char) (upper-case-p char))
(symbol- name (second S))))
(when (and (some #'upper-case-p (symbol-name (second S)))
(cons 'nnp (cdr S))))
is sufficient to trigger the bug.
Christophe