From: <ma...@at...> - 2000-11-27 10:09:40
|
William Harold Newman wrote: > > On Sat, Nov 25, 2000 at 07:20:09PM +0100, ma...@at... wrote: > > Hi, > > > > working on my cmucl-list of patches, I found one documentation patch by > > Raymond toy. > > This affects doc/cmucl/internals/object.tex. > > I've looked at that, but I can't really figure it out, if this is > > correct for the current state of SBCL, or not. > > I hope, at least reporting this "finding" again makes sense. > > Thank you. I think that the information on the fill pointer being 29 > bits and so forth is probably correct for SBCL (and for the CMU CL > version that I forked SBCL from). Certainly a fair amount of the > internals documentation was slightly out of date at the time of the > fork, and 29 bits sounds right. However, it will take some work for me > to check it, and I may not get to it for a while. ok. thanks. > get around to it, and this update from Raymond Toy, when I am happier > with the stability of the 0.6.x branch. (Does anyone have any > patches to make SIGINT handling more reliable?:-) Well, as you wrote in a previous mail, this is really a complicated issue, that cannot be easily reproduced: But all this seems to be related to floating point exceptions that are not handled correctly: If you evaluate (/ 1.0 0) you end up with * (/ 1.0 0) debugger invoked on condition of type SB-KERNEL:FLOATING-POINT-EXCEPTION: An arithmetic error SB-KERNEL:FLOATING-POINT-EXCEPTION was signalled. (caught SIMPLE-ERROR when trying to print *DEBUG-CONDITION*) entering the debugger because of *DEBUG-CONDITION* Within the debugger, you can type HELP for help. At any command prompt (inside the debugger or not) you can type (SB-EXT:QUIT) to terminate the SBCL executable. restarts: 0: [ABORT ] Reduce debugger level (leaving debugger). 1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. (SB-VM:SIGFPE-HANDLER #<SB-DEBUG::UNPRINTABLE-OBJECT unavailable argument> #<SB-DEBUG::UNPRINTABLE-OBJECT unavailable argument> #<SB-DEBUG::UNPRINTABLE-OBJECT unavailable argument>) 0] and the floating point exception is not printed at all. And SBCL is screwed after that, too!! I have to do some "simple things" like evaluating "1" some times, to get it working again. I've been looking at this, but I haven't found a real solution up to now. I've appended a patch that will at least print the floating point exception, but it still hangs with the UNPRINTABLE-OBJECT. (I cleaned up some FIXMEs in debug-int, too). For a "reproducible" solution, I've come with this (and that is really hairy): 1. start up ILISP 2. load "chill" 3. compile some file in ILISP ("src/code/defstruct.lisp", for example). 4. immediately after hitting (C-c k), e.g. compile-file, hit C-c C-c (interrupt) this has to happen _really_ fast !! after that I get the following: 1 * ;;;Compile /home/ma/data/lisp/sbcl/sbclbugs/sbcl-0625-mod/src/code/defstruct.lisp ; compiling file "/home/ma/data/lisp/sbcl/sbclbugs/sbcl-0625-mod/src/code/defstruct.lisp" (written 27 NOV 2000 10:14:46 AM): ; byte compiling top-level form: ; compilation unit aborted ; caught 1 fatal ERROR condition ; compilation aborted after 0:00:00 debugger invoked on condition of type SIMPLE-ERROR: error in function SB-CONDITIONS::FIND-SLOT-DEFAULT: unbound condition slot: SB-CONDITIONS::FLAGS entering the debugger because of *DEBUG-CONDITION* Within the debugger, you can type HELP for help. At any command prompt (inside the debugger or not) you can type (SB-EXT:QUIT) to terminate the SBCL executable. restarts: 0: [ABORT ] Reduce debugger level (leaving debugger). 1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. (SB-CONDITIONS::FIND-SLOT-DEFAULT #<SB-CONDITIONS::CONDITION-CLASS SB-KERNEL:FLOATING-POINT-EXCEPTION> #S(SB-CONDITIONS::CONDITION-SLOT :NAME SB-CONDITIONS::FLAGS :INITARGS # :READERS # :WRITERS NIL :INITFORM-P NIL ...)) 0] debugger invoked on condition of type SIMPLE-CONDITION: interrupted at #X400DA71E entering the debugger because of *DEBUG-CONDITION* Within the debugger, you can type HELP for help. At any command prompt (inside the debugger or not) you can type (SB-EXT:QUIT) to terminate the SBCL executable. restarts: 0: [CONTINUE] Return from BREAK. 1: [ABORT ] Reduce debugger level (to debug level 1). 2: Reduce debugger level (leaving debugger). 3: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. ("foreign function call land") 0]] My patch helps this, because now the slot "flags" is found, but I don't really know, why this exception is generated in the first place. Maybe this helps to give somebody an idea ... Cheers, Martin Here is the patch: diff -u -r -w /home/ma/data/src/sbcl/src/code/debug-int.lisp sbcl-0625-mod/src/code/debug-int.lisp --- /home/ma/data/src/sbcl/src/code/debug-int.lisp Mon Nov 6 06:16:51 2000 +++ sbcl-0625-mod/src/code/debug-int.lisp Mon Nov 27 10:16:36 2000 @@ -1112,8 +1112,8 @@ (without-gcing (let* ((component-ptr (component-ptr-from-pc (sb!vm:context-pc context))) - (code (if (sap= component-ptr (int-sap #x0)) - nil ; FIXME: UNLESS might be clearer than IF. + (code (unless (sap= component-ptr (int-sap #x0)) + ;; MNA: nil ; FIXME: UNLESS might be clearer than IF. (component-from-component-ptr component-ptr)))) (when (null code) (return (values code 0 context))) @@ -1205,7 +1205,8 @@ (>= pc (sb!c::compiled-debug-function-elsewhere-pc (svref function-map 0))))) ;; FIXME: I don't think SB!C is the home package of INDEX. - (declare (type sb!c::index i)) + ;; MNA: no it isn't. + (declare (type sb!int:index i)) (loop (when (or (= i len) (< pc (if elsewhere-p diff -u -r -w /home/ma/data/src/sbcl/src/code/late-target-error.lisp sbcl-0625-mod/src/code/late-target-error.lisp --- /home/ma/data/src/sbcl/src/code/late-target-error.lisp Wed Nov 15 22:08:18 2000 +++ sbcl-0625-mod/src/code/late-target-error.lisp Mon Nov 27 10:14:46 2000 @@ -688,6 +688,10 @@ ;;; floating point exceptions? (define-condition floating-point-exception (arithmetic-error) ((flags :initarg :traps + ;; MNA: added initform + ;; now (/ 1.0 0) displays the condition ... + ;; and floating-point-exceptions are displayed ... + :initform nil :reader floating-point-exception-traps)) (:report (lambda (condition stream) (format stream -- Homepage: http://www.atzmueller.net/ Email: ma...@at... |