Hi all,

I'm trying to port some software I had written that works fine on 
allegro CL to cmucl. I'm getting an unusual error: a form that runs fine 
at the top level fails to run when I have it in a function, and execute 
the function. Before I try to produce a bug report, I'd like to try 
things on a relatively new CMUCL snapshot. I'm presently working with 
the april snapshot that used to be on common-lisp.net and has since 
vanished. Is there a newer snapshot available?

Also, I'll need a bit of advice on how I might track down this bug. 
Here's the function that appears to be breaking:

(defun define-stack-test-suite ()
   (defsuite stack-object-tests ()
     ((stack :initform nil))
     ;; Let's test a stack
     (:setup (setq stack nil))
     (:test () (null stack))))

defsuite, as you might guess, is a macro that expands ultimately into a 
few definitions, including classes and methods. When I run this 
function, I see this:

FRET> (define-stack-test-suite)
; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. SI):
; Compiling Top-Level Form:
; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. OBJ):
; Compiling Top-Level Form:
; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. SI):
; Compiling Top-Level Form:
Execution of a form compiled with errors:
  (DEFCASE (STACK-OBJECT-TESTS) (NULL STACK))
Error flushed ...
; Evaluation aborted

Not particularly useful. Also an interesting outcome of running my code 
is...

CL-USER> (quit)

Error in function UNIX::SIGSEGV-HANDLER:  Segmentation Violation at 
#x100000C8.
Error flushed ...
; Evaluation aborted


BTW, I also have slime loaded. Without slime, the behavior is a bit 
different. I can actually see more of the error condition.


; In: FRET:DEFSUITE FRET::STACK-OBJECT-TESTS

;   (FRET:DEFSUITE FRET::STACK-OBJECT-TESTS NIL (#) (:SETUP #) ...)
; --> PROGN
; ==>
;   (FRET:DEFCASE (FRET::STACK-OBJECT-TESTS) (NULL FRET::STACK))
; Error: (during macroexpansion)
; Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
;    NIL is not of type FRET::TEST-SUITE-DATA
; [GC threshold exceeded with 18,936,864 bytes in use.  Commencing GC.]
; [GC completed with 11,213,568 bytes retained and 7,723,296 bytes freed.]
; [GC will next occur when at least 23,213,568 bytes are in use.]
Test Case Failure: #<FRET::SUITE-IO-TESTS-TEST-CASE-2 {5884D37D}>


Error in function UNIX::SIGSEGV-HANDLER:  Segmentation Violation at 
#x99E5A513.
    [Condition of type SIMPLE-ERROR]

Restarts:
   0: [RETRY  ] Retry this test.
   1: [SKIP   ] Skip this test.
   2: [DISABLE] Disable this test and continue.
   3: [ABORT  ] Return to Top-Level.

Debug  (type H for help)

(UNIX::SIGSEGV-HANDLER #<unused-arg>
                        #<unused-arg>
                        #.(SYSTEM:INT-SAP #x3FFFECA8))
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer 
exists:
   target:code/signal.lisp.
0] backtrace

0: (UNIX::SIGSEGV-HANDLER #<unused-arg>
                           #<unused-arg>
                           #.(SYSTEM:INT-SAP #x3FFFECA8))
1: (UNIX::SIGSEGV-HANDLER 3
                           #<unused-arg>
                           #<unused-arg>
                           #.(SYSTEM:INT-SAP #x3FFFECA8))[:EXTERNAL]


Again, doesn't tell me all that much, except that I might be tickling a 
bug in CMUCL internals. I'm running on x86, fedora fc2, on a dual 
processor box though I doubt this is relevant. Any suggestions on 
debugging this problem?

If anyone wishes to try out the source code, you can either fetch it 
using svn from http://www.mono-picante.org/vc/fret/trunk/, or if you 
don't I can post it.

Thanks!

Sunil

Reply via email to