From: Sam S. <sd...@gn...> - 2004-11-26 20:16:28
|
> * Bruno Haible <oe...@py...t> [2004-11-25 20:07:27 +0100]: > > Sam wrote: >> Does this patch fix the problem? > > Probably not. It looks mostly like a no-op. Don't you have a test case? > It's easy to find one: > > (defun test () (multiple-value-call #'list 10 20 30 40 50 60 70 (/ 0))) > (test) > (show-stack) looks good: [1]> (defun test () (multiple-value-call #'list 10 20 30 40 50 60 70 (/ 0))) TEST [2]> (test) *** - division by zero The following restarts are available: ABORT :R1 ABORT Break 1 [3]> :bt1 <1> #<SYSTEM-FUNCTION SHOW-STACK> <2> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE> <3> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE-1> <4> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> <5> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-2> <6> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> <7> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2> <8> #<SYSTEM-FUNCTION SYSTEM::DRIVER> <9> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP> - #<SYSTEM::SIMPLE-DIVISION-BY-ZERO #x102F8225> - NIL - #<SYSTEM::SIMPLE-DIVISION-BY-ZERO #x102F8225> <10> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> frame binding variables (~ = dynamically): | ~ SYSTEM::*PRIN-STREAM* <--> #<UNBOUND> frame binding variables (~ = dynamically): | ~ *PRINT-READABLY* <--> NIL frame binding variables (~ = dynamically): | ~ *PRINT-ESCAPE* <--> T - #<SYSTEM::SIMPLE-DIVISION-BY-ZERO #x102F8225> - 0 <11> #<SYSTEM-FUNCTION /> 0 EVAL frame for form (/ 0) - NIL - 70 - 60 - 50 - 40 - 30 - 20 - 10 <12> #<SPECIAL-OPERATOR MULTIPLE-VALUE-CALL> - #<SYSTEM-FUNCTION LIST> EVAL frame for form (MULTIPLE-VALUE-CALL #'LIST 10 20 30 40 50 60 70 (/ 0)) - NIL frame binding environments VAR_ENV <--> NIL FUN_ENV <--> NIL BLOCK_ENV <--> NIL GO_ENV <--> NIL DECL_ENV <--> ((DECLARATION OPTIMIZE DECLARATION)) frame binding variables #<ADDRESS #x101004CC> binds (~ = dynamically): Next environment: NIL APPLY frame for call (TEST) - #<FUNCTION TEST NIL (DECLARE (SYSTEM::IN-DEFUN TEST)) (BLOCK TEST (MULTIPLE-VALUE-CALL #'LIST 10 20 30 40 50 60 70 (/ 0)))> <13> #<FUNCTION TEST NIL (DECLARE (SYSTEM::IN-DEFUN TEST)) (BLOCK TEST (MULTIPLE-VALUE-CALL #'LIST 10 20 30 40 50 60 70 (/ 0)))> 0 EVAL frame for form (TEST) - #<IO TERMINAL-STREAM> <14> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> - #<IO TERMINAL-STREAM> frame binding variables (~ = dynamically): | ~ SYSTEM::*ACTIVE-RESTARTS* <--> NIL compiled tagbody frame for #(NIL) - 87 - #(NIL NIL) Printed 14 frames Break 1 [3]> > Also (compile 'test) signals an error; this is a serious bug as well, > probably in or near the 2001-10-10 patch. If constant folding leads to > an error, the compiler must not do the constant folding. Likewise for > > (defun test () (* 1e30 1e30)) > (compile 'test) I checked in a fix for that: [3]> (defun test-constant-folding () (* 1e30 1e30)) TEST-CONSTANT-FOLDING [4]> (compile *) WARNING in TEST-CONSTANT-FOLDING : Run time error expected: floating point overflow WARNING in TEST-CONSTANT-FOLDING : Run time error expected: floating point overflow TEST-CONSTANT-FOLDING ; 2 ; 2 why is the error reported twice?! -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> My other CAR is a CDR. |