Hi,

Save the following in file bug.lisp:

  (declaim (optimize (safety 3) (debug 3) (speed 1)))
  
  (defun weird (ameba)
    (let ((current-threshold (current-threshold ameba))
          (max-bin-wt (max-bin-weight ameba))
          (cs-map (current-c->s-map ameba)))
      (labels ((s->c (wt)
                 (declare (Single-Float wt))
                 (screen-blob->chart-blob (* 8 (truncate wt))
                                          cs-map)))
        (when (<= max-bin-wt current-threshold)
          #'s->c))))

Compiling bug.lisp in cmucl-18e-x86-linux, cmucl-2003-04-13-x86-linux,
or cmucl-2003-04-17-x86-linux will generate warning messages, which
is O.K.

Compiling bug.lisp in any x86-linux binary built on or after 2003-05-15
will get the following error:

  Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
     NIL is not of type C::CONTINUATION
     [Condition of type TYPE-ERROR]

The complete error message and backtrace are attached at the end of
this message.

If I comment out either (DECLAIM ...) or (DECLARE ...) or both, compiling
bug.lisp will not throw me into the debugger.

Could somebody show me how to get around this problem?

Best,

-cph

----------------- complete error message and backtrace ------------------

Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
   NIL is not of type C::CONTINUATION
   [Condition of type TYPE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(C::FIND-PUSHED-CONTINUATIONS #<C::CBLOCK Start = c1 {4802FE8D}>)
Source: Error finding source: 
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer exists:
  target:compiler/stack.lisp.
0] back

0: (C::FIND-PUSHED-CONTINUATIONS #<C::CBLOCK Start = c1 {4802FE8D}>)
1: (C::STACK-ANALYZE #<C:COMPONENT #x48035545  NAME= "DEFUN WEIRD">)
2: (C::NATIVE-COMPILE-COMPONENT #<C:COMPONENT #x48035545  NAME= "DEFUN WEIRD">)
3: (C::COMPILE-COMPONENT #<C:COMPONENT #x48035545  NAME= "DEFUN WEIRD">)
4: (C::COMPILE-TOP-LEVEL
    (#<LAMBDA #x4802E84D
           NAME= "Top-Level Form"
           TYPE= #
           WHERE-FROM= :DEFINED
           VARS= NIL>)
    NIL)
5: (C::CONVERT-AND-MAYBE-COMPILE
    (C::%DEFUN 'WEIRD #'(LAMBDA # #) NIL '(DEFUN WEIRD # #))
    ((C::%DEFUN 'WEIRD #'# NIL '#) C::ORIGINAL-SOURCE-START 0 1))
6: (C::PROCESS-FORM (C::%DEFUN 'WEIRD #'(LAMBDA # #) NIL '(DEFUN WEIRD # #))
                      (C::ORIGINAL-SOURCE-START 0 1))
7: (C::PROCESS-FORM
    (DEFUN WEIRD (AMEBA)
        (LET #
          #))
    (C::ORIGINAL-SOURCE-START 0 1))
8: (C::PROCESS-FORM 2
                      (DEFUN WEIRD (AMEBA)
                        (LET #
                          #))
                      (C::ORIGINAL-SOURCE-START 0 1))[:EXTERNAL]
9: (C::PROCESS-SOURCES #<Source-Info>)
10: ((FLET #:G0
         C::SUB-COMPILE-FILE))
11: (C::SUB-COMPILE-FILE #<Source-Info> NIL)
12: (C::SUB-COMPILE-FILE 1 #<Source-Info> NIL)[:EXTERNAL]
13: (COMPILE-FILE "/tmp/bug" :OUTPUT-FILE T :ERROR-FILE ...)
14: (INTERACTIVE-EVAL (COMPILE-FILE "/tmp/bug"))
15: (LISP::%TOP-LEVEL)
16: ((LABELS LISP::RESTART-LISP
       SAVE-LISP))


Reply via email to