Ticket #960 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 years ago

set-pprint-dispatch fails

Reported by: fare Owned by:
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description

(progn (set-pprint-dispatch '(eql foo) #'(lambda (s o) o (format s "<Bar>"))) (write 'foo :pretty t) (terpri))"
Fails with a low-level error.

It works on all other implementations at my command-line:

for l in sbcl cmucl clisp ecl abcl xcl gclcvs allegro lispworks scl ccl ; do echo $l ;  cl -l $l -i "(progn (set-pprint-dispatch '(eql foo) #'(lambda (s o) o (format s \"<Bar>\"))) (write 'foo :pretty t) (terpri))" ; done

Relevant excerpt from the CCL backtrace:

> Error of type TYPE-ERROR: value NIL is not of the expected type STRUCTURE.
> While executing: CCL::SET-PPRINT-DISPATCH+, in process listener(1).
 (7FDFC28156E0) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN NIL :DETAILED-P T :COUNT 1152921504606846975 :START-FRAME-NUMBER 0 :STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x3020006A281D> :PRINT-LEVEL 2 :PRINT-LENGTH 5 :SHOW-INTERNAL-FRAMES NIL :FORMAT :TRADITIONAL) 861
  (&KEY :CONTEXT :PROCESS :ORIGIN :DETAILED-P :COUNT :START-FRAME-NUMBER :STREAM :PRINT-LEVEL :PRINT-LENGTH :SHOW-INTERNAL-FRAMES :FORMAT)
   CCL::CONTEXT: NIL
   PROCESS: NIL
   CCL::ORIGIN: NIL
   CCL::DETAILED-P: T
   COUNT: 1152921504606846975
   CCL::START-FRAME-NUMBER: 0
   STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #x3020006A281D>
   CCL::PRINT-LEVEL: 2
   CCL::PRINT-LENGTH: 5
   CCL::SHOW-INTERNAL-FRAMES: NIL
   FORMAT: :TRADITIONAL

  CCL::FRAME-NUMBER: 0
  *BACKTRACE-PRINT-LEVEL*: 2
  *BACKTRACE-PRINT-LENGTH*: 5
  *BACKTRACE-FORMAT*: :TRADITIONAL
  *STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO* #x3020006A281D>
  *PRINT-CIRCLE*: NIL

 (7FDFC2815848) : 1 (ABNORMAL-APPLICATION-EXIT) 269
  NIL

  #:G137218: (ERROR)
  CCL::%HANDLERS%: ((ERROR) (PROCESS-RESET))

 (7FDFC2815878) : 2 (BREAK-LOOP-HANDLE-ERROR #<TYPE-ERROR #x30200074768D> 17574877211466) 1461
  (CONDITION *TOP-ERROR-FRAME*)
   CONDITION: #<TYPE-ERROR #x30200074768D>
   *TOP-ERROR-FRAME*: 17574877211466

  CCL::BOGUS-GLOBALS: NIL
  CCL::NEWVALS: NIL
  CCL::OLDVALS: NIL

 (7FDFC28158F0) : 3 (%ERROR #<TYPE-ERROR #x30200074768D> NIL 17574877211466) 357
  (CONDITION CCL::ARGS CCL::ERROR-POINTER)
   CONDITION: #<TYPE-ERROR #x30200074768D>
   CCL::ARGS: NIL
   CCL::ERROR-POINTER: 17574877211466



 (7FDFC2815918) : 4 (FUNCALL #'#<(:INTERNAL CCL::%XERR-DISP)>) 4269
  NIL

  CCL::FRAME-PTR: 17574877211466
  CCL::FN: #<Compiled-function CCL::SET-PPRINT-DISPATCH+ #x300000B0C3EF>
  CCL::OP0: 205
  CCL::OP1: 220
  CCL::OP2: 54
  CCL::SKIP: -1
  CCL::TYPENAME: STRUCTURE
  CCL::XP: #<A Foreign Pointer #x7FDFC2A794D0>
  CCL::XCF: #<A Foreign Pointer #x7FDFC2815A50>

 (7FDFC2815970) : 5 (FUNCALL-WITH-ERROR-REENTRY-DETECTION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x7FDFC40A726F>) 181
  (CCL::THUNK)
   CCL::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x7FDFC40A726F>

  COUNT: 0
  CCL::*ERROR-REENTRY-COUNT*: 0

 (7FDFC28159B0) : 6 (FUNCALL #'#<CCL::%XERR-DISP> 17574877524464) 549
  (#:G149901)
   #:G149901: 17574877524464

  #:G149910: #<A Foreign Pointer [stack-allocated] #x7FDFC2A78F80>
  CCL::XP: #<A Foreign Pointer #x7FDFC2A794D0>
  CCL::XCF: #<A Foreign Pointer #x7FDFC2815A50>
  #:G149911: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x7FDFC40A726F>

 (7FDFC28159E8) : 7 (%PASCAL-FUNCTIONS% 2 17574877524464) 397
  (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
   CCL::INDEX: 2
   CCL::ARGS-PTR-FIXNUM: 17574877524464

  CCL::LISP-FUNCTION: #<Compiled-function CCL::%XERR-DISP (Non-Global)  #x3000005A1EDF>
  WITHOUT-INTERRUPTS: NIL
  CCL::*CALLBACK-TRACE-P*: NIL

*(7FDFC2815A50) : 8 (SET-PPRINT-DISPATCH+ (EQL FOO) #<Anonymous Function #x30200075630F> 0 NIL) 1273
  (CCL::TYPE-SPECIFIER FUNCTION CCL::PRIORITY CCL::TABLE)
   CCL::TYPE-SPECIFIER: (EQL FOO)
   FUNCTION: #<Anonymous Function #x30200075630F>
   CCL::PRIORITY: 0
   CCL::TABLE: NIL

  CCL::CATEGORY: CCL::OTHER
  CCL::PRED: #<Anonymous Function #x3020007477BF>
  CCL::ENTRY: #<CCL::ENTRY #x30200074776D>

 (7FDFC2815B00) : 9 (CALL-CHECK-REGS SET-PPRINT-DISPATCH (EQL FOO) #<Anonymous Function #x30200075630F>) 221
  (CCL::FN &REST CCL::ARGS)
   CCL::FN: SET-PPRINT-DISPATCH
   CCL::ARGS: ((EQL FOO) #<Anonymous Function #x30200075630F>)

  CCL::OLD-REGS: ((# #) (SET-PPRINT-DISPATCH # #) #<CCL::LEXICAL-ENVIRONMENT #x30200072143D> CCL::*LOADING-TOPLEVEL-LOCATION*)

 (7FDFC2815B38) : 10 (FUNCALL #'#<(:INTERNAL CCL::PROGN-IN-ENV CCL::CHEAP-EVAL-IN-ENVIRONMENT)> ((SET-PPRINT-DISPATCH # #) (WRITE # :PRETTY T) (TERPRI)) NIL NIL) 293
  (CCL::BODY&DECLS CCL::PARSE-ENV CCL::BASE-ENV)
   CCL::BODY&DECLS: ((SET-PPRINT-DISPATCH # #) (WRITE # :PRETTY T) (TERPRI))
   CCL::PARSE-ENV: NIL
   CCL::BASE-ENV: NIL

  CCL::BODY: (LAMBDA (CCL::X) (TYPEP CCL::X #))
  CCL::DECLS: NIL
  CCL::DEFAULT-LOCATION: NIL
  CCL::FORM: #<CCL::ENTRY #x30200074776D>

Change History

comment:1 Changed 2 years ago by gb

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of ticket:784.

Note: See TracTickets for help on using tickets.