ccl: slime fails to disassemble a generic function

Bug #1365841 reported by Pascal J. Bourguignon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Slime
Invalid
Undecided
Unassigned

Bug Description

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

When launched from the shell, ccl can disassemble this generic function without a glitch:

    ? (in-package :ui)
    #<Package "MCLGUI">
    ? (disassemble (function call-with-focused-view))
    L0
             (leaq (@ (:^ L0) (% rip)) (% fn)) ; [0]
             (movq (@ (% rsp)) (% temp2)) ; [7]
             (movl (% nargs) (% imm0.l)) ; [11]
             (subq ($ 24) (% imm0)) ; [13]
             (jle L34) ; [17]
             (movq (% rbp) (@ 8 (% rsp) (% imm0))) ; [19]
             (leaq (@ 8 (% rsp) (% imm0)) (% rbp)) ; [24]
             (popq (@ 8 (% rbp))) ; [29]
             (jmp L38) ; [32]
    L34
             (pushq (% rbp)) ; [34]
             (movq (% rsp) (% rbp)) ; [35]
    L38
             (testl (% nargs) (% nargs)) ; [38]
             (je L53) ; [40]
             (cmpl ($ 16) (% nargs)) ; [42]
             (je L51) ; [45]
             (jb L52) ; [47]
             (pushq (% arg_x)) ; [49]
    L51
             (pushq (% arg_y)) ; [51]
    L52
             (pushq (% arg_z)) ; [52]
    L53
             (pushq (% imm2)) ; [53]
             (movq (% rsp) (% arg_z)) ; [54]
             (movl (@ #x12FB8) (% imm0.l)) ; [57]
             (cmpq (% temp2) (% imm0)) ; [64]
             (je L79) ; [67]
             (movl (@ #x12F08) (% temp2.l)) ; [69]
             (jmp L89) ; [77]
    L79
             (pushq (@ #x12F10)) ; [79]
             (movq (% imm0) (% temp2)) ; [86]
    L89
             (pushq (% temp2)) ; [89]
             (movq (@ '#((#<COMMON-LISP:STANDARD-METHOD CALL-WITH-FOCUSED-VIEW (SIMPLE-VIEW T)>) NIL NIL 0 #<COMMON-LISP:STANDARD-GENERIC-FUNCTION CALL-WITH-FOCUSED-VIEW #x302003C20B7F> 0 NIL NIL #<Unbound> NIL) (% fn)) (% arg_y)) ; [91]
             (movl ($ 16) (% nargs)) ; [98]
             (jmpq (@ '#<Compiled-function CCL::%%1ST-ARG-DCODE #x300000206E6F> (% fn))) ; [103]
    NIL
    ?

but when doing the same in slime, it fails:

    ui> (disassemble (function call-with-focused-view))
    L0
             (leaq (@ (:^ L0) (% rip)) (% fn)) ; [0]
             (movq (@ (% rsp)) (% temp2)) ; [7]
             (movl (% nargs) (% imm0.l)) ; [11]
             (subq ($ 24) (% imm0)) ; [13]
             (jle L34) ; [17]
             (movq (% rbp) (@ 8 (% rsp) (% imm0))) ; [19]
             (leaq (@ 8 (% rsp) (% imm0)) (% rbp)) ; [24]
             (popq (@ 8 (% rbp))) ; [29]
             (jmp L38) ; [32]
    L34
             (pushq (% rbp)) ; [34]
             (movq (% rsp) (% rbp)) ; [35]
    L38
             (testl (% nargs) (% nargs)) ; [38]
             (je L53) ; [40]
             (cmpl ($ 16) (% nargs)) ; [42]
             (je L51) ; [45]
             (jb L52) ; [47]
             (pushq (% arg_x)) ; [49]
    L51
             (pushq (% arg_y)) ; [51]
    L52
             (pushq (% arg_z)) ; [52]
    L53
             (pushq (% imm2)) ; [53]
             (movq (% rsp) (% arg_z)) ; [54]
             (movl (@ #x12FB8) (% imm0.l)) ; [57]
             (cmpq (% temp2) (% imm0)) ; [64]
             (je L79) ; [67]
             (movl (@ #x12F08) (% temp2.l)) ; [69]
             (jmp L89) ; [77]
    L79
             (pushq (@ #x12F10)) ; [79]
             (movq (% imm0) (% temp2)) ; [86]
    L89
             (pushq (% temp2)) ; [89]
             (movq (@
    > Debug: Can't use #<error printing ccl::immediate #x12> as a hash-table key
    > While executing: (:internal swank::invoke-default-debugger), in process repl-thread(111).
    > Type cmd-. to abort, cmd-\ for a list of available restarts.
    > Type :? for other options.
    1 > :b

     (2B3C9B00) : 0 (funcall #'#<(:internal swank::invoke-default-debugger)>) 53
     (2B3C9B20) : 1 (funcall #'#<swank-backend:call-with-debugger-hook> nil #<ccl:compiled-lexical-closure (:internal swank::invoke-default-debugger) #x30200510D85F>) 181
     (2B3C9BA8) : 2 (call-with-debugger-hook nil #<ccl:compiled-lexical-closure (:internal swank::invoke-default-debugger) #x30200510D85F>) 181
     (2B3C9BD8) : 3 (invoke-default-debugger #<simple-error #x30200501170D>) 181
     (2B3C9BF8) : 4 (swank-debugger-hook #<simple-error #x30200501170D> #<Compiled-function swank:swank-debugger-hook #x302001AB5FEF>) 533
     (2B3C9C28) : 5 (break-loop-handle-error #<simple-error #x30200501170D> 90674079) 629
     (2B3C9CD0) : 6 (%error #<simple-error #x30200501170D> (#<Unbound>) 90674079) 333
     (2B3C9CF8) : 7 (puthash ? #<hash-table :test eq size 13/31 #x30200500CCFD> 0 0) 269
     (2B3C9D48) : 8 (circularity-process #<ccl::xp-structure #x302005006E4D> ? nil) 445
     (2B3C9D80) : 9 (write+ ? #<ccl::xp-structure #x302005006E4D> nil nil) 189
     (2B3C9DC0) : 10 (write-internal #<ccl::xp-stream #x302005011F0D> ? 1152921504606846974 nil) 773
     (2B3C9E20) : 11 (write-an-array #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) #<ccl::xp-stream #x302005011F0D> 1152921504606846975) 1437
     (2B3C9EC0) : 12 (funcall #'#<#<ccl::standard-kernel-method print-object (t t)>> #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) #<ccl::xp-stream #x302005011F0D>) 2029
     (2B3C9EF8) : 13 (%call-next-method (nil #<ccl::standard-kernel-method print-object #> . 90674171)) 989
     (2B3C9F78) : 14 (%%standard-combined-method-dcode (#<ccl::standard-kernel-method print-object :around #> #<ccl::standard-kernel-method print-object #>) 90674171) 669
     (2B3C9FF0) : 15 (write-a-frob #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) #<ccl::xp-stream #x302005011F0D> 1152921504606846975 nil) 165
     (2B3CA070) : 16 (write-internal #<ccl::xp-stream #x302005011F0D> #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) 1152921504606846975 nil) 773
     (2B3CA0D0) : 17 (write-1 #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) #<ccl::xp-stream #x302005011F0D> 1152921504606846975) 541
     (2B3CA100) : 18 (prin1 #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...) #<ccl::xp-stream #x302005011F0D>) 133
     (2B3CA140) : 19 (funcall #'#<ccl::format-prin1> #<ccl::xp-stream #x302005011F0D> nil nil) 181
     (2B3CA190) : 20 (sub-format #<ccl::xp-stream #x302005011F0D> 2 3) 2285
     (2B3CA238) : 21 (do-sub-format #<ccl::xp-stream #x302005011F0D>) 157
     (2B3CA258) : 22 (do-sub-format-1 #<ccl::xp-stream #x302005011F0D> (#(# nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...))) 221
     (2B3CA2D8) : 23 (do-xp-printing #<Compiled-function (:internal format) (Non-Global) #x30000093258F> #<swank-backend::slime-output-stream #x302004EE63ED> ((#))) 333
     (2B3CA360) : 24 (funcall #'#<(:internal ccl::do-it ccl::xp-print)> #<Compiled-function (:internal format) (Non-Global) #x30000093258F> #<swank-backend::slime-output-stream #x302004EE63ED> ((#))) 45
     (2B3CA388) : 25 (maybe-initiate-xp-printing #<Compiled-function (:internal format) (Non-Global) #x30000093258F> #<swank-backend::slime-output-stream #x302004EE63ED> (#(# nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...))) 573
     (2B3CA408) : 26 (format #<swank-backend::slime-output-stream #x302004EE63ED> "'~s" #((#<#>) nil nil 0 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> ...)) 1597
     (2B3CA4A8) : 27 (funcall #'#<(:internal ccl::out ccl::write-x86-lap-operand)> t (ccl:\@ '# (ccl::% "fn"))) 621
     (2B3CA4E0) : 28 (x86-print-di-lap #S(ccl::x86-disassembly-state :mode-64 t :prefixes 0 ...) #<x86-disassembled-instruction (movq#<error printing object> 9 91) 557
     (2B3CA528) : 29 (x86-print-disassembled-instruction #S(ccl::x86-disassembly-state :mode-64 t :prefixes 0 ...) #<x86-disassembled-instruction (movq#<error printing object> 1 #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F>) 1325
     (2B3CA5B0) : 30 (x86-disassemble-xfunction #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F> #<xfunction #x30200500C54D> :symbolic-names #<hash-table :test equal size 76/90 #x302000182F6D> :collect-function #<Compiled-function ccl::x86-print-disassembled-instruction #x300000A440CF> :header-function #<Compiled-function ccl::x86-print-disassembled-function-header #x300000A43CFF>) 2077
     (2B3CA658) : 31 (call-check-regs disassemble #<common-lisp:standard-generic-function call-with-focused-view #x302003E5B46F>) 221
     (2B3CA690) : 32 (cheap-eval (disassemble #'call-with-focused-view)) 101
     (2B3CA6C8) : 33 (eval-region "(disassemble (function call-with-focused-view))
    ") 381
     (2B3CA750) : 34 (funcall #'#<(:internal swank::repl-eval)>) 61
     (2B3CA770) : 35 (track-package #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200500C91F>) 357
     (2B3CA7C8) : 36 (funcall #'#<(:internal swank::repl-eval)>) 181
     (2B3CA7E8) : 37 (call-with-retry-restart "Retry SLIME REPL evaluation request." #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200500C9AF>) 453
     (2B3CA840) : 38 (funcall #'#<(:internal swank::repl-eval)>) 189
     (2B3CA860) : 39 (funcall #'#<Anonymous Function #x30200192FE5F> #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200500C9EF>) 69
     (2B3CA880) : 40 (call-with-syntax-hooks #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200500C9EF>) 181
     (2B3CA8A8) : 41 (call-with-buffer-syntax nil #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200500C9EF>) 237
     (2B3CA8F0) : 42 (repl-eval "(disassemble (function call-with-focused-view))
    ") 189
     (2B3CA908) : 43 (listener-eval "(disassemble (function call-with-focused-view))
    " :window-width nil) 325
     (2B3CA940) : 44 (call-check-regs swank:listener-eval "(disassemble (function call-with-focused-view))
    ") 221
     (2B3CA978) : 45 (cheap-eval (swank:listener-eval "(disassemble (function call-with-focused-view))
    ")) 101
     (2B3CA9B0) : 46 (eval-for-emacs (swank:listener-eval "(disassemble (function call-with-focused-view))
    ") "MCLGUI" 11) 1533
     (2B3CAAC0) : 47 (process-requests nil) 293
     (2B3CAB00) : 48 (funcall #'#<(:internal swank::handle-requests)>) 389
     (2B3CAB78) : 49 (funcall #'#<(:internal swank::handle-requests)>) 445
     (2B3CABB0) : 50 (funcall #'#<swank-backend:call-with-debugger-hook> #<Compiled-function swank:swank-debugger-hook #x302001AB5FEF> #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x302004EE733F>) 181
     (2B3CAC38) : 51 (call-with-debugger-hook #<Compiled-function swank:swank-debugger-hook #x302001AB5FEF> #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x302004EE733F>) 181
     (2B3CAC68) : 52 (funcall #'#<(:internal swank::handle-requests)>) 77
     (2B3CAC88) : 53 (call-with-bindings ((*standard-output* . #) (*standard-input* . #) (*trace-output* . #) (*error-output* . #) (*debug-io* . #<two-way-stream input #<swank-backend::slime-input-stream #x302004EE650D>, output #<swank-backend::slime-output-stream #x302004EE63ED> #x302004EDE60D>) ...) #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x302004EE72EF>) 413
     (2B3CACC8) : 54 (handle-requests #<multithreaded-connection #x302004ECA54D> nil) 1061
     (2B3CADC0) : 55 (repl-loop #<multithreaded-connection #x302004ECA54D>) 53
     (2B3CADE0) : 56 (funcall #'#<(:internal swank::spawn-repl-thread)>) 53
     (2B3CAE00) : 57 (call-with-bindings ((*print-pretty*) (*print-level*) (*print-length*) (*print-circle* . t) (*print-case* . :downcase) ...) #<ccl:compiled-lexical-closure (:internal swank::spawn-repl-thread) #x302004EE768F>) 413
     (2B3CAE40) : 58 (funcall #'#<(:internal swank::spawn-repl-thread)>) 205
     (2B3CAE60) : 59 (run-process-initial-form #<process repl-thread(111) [Active] #x302004ED5ACD> (#<ccl:compiled-lexical-closure # #x302004ED585F>)) 669
     (2B3CAEF0) : 60 (funcall #'#<(:internal (ccl::%process-preset-internal (ccl:process)))> #<process repl-thread(111) [Active] #x302004ED5ACD> (#<ccl:compiled-lexical-closure # #x302004ED585F>)) 573
     (2B3CAF98) : 61 (funcall #'#<(:internal ccl::thread-make-startup-function)>) 277
    1 > :q
    ; Evaluation aborted on #<simple-error #x30200501170D>.
    ui>

    cl-user> (cl-user::print-bug-report-info)

    LISP-IMPLEMENTATION-TYPE "Clozure Common Lisp"
    LISP-IMPLEMENTATION-VERSION "Version 1.9 (Darwinx8664)"
    SOFTWARE-TYPE "Darwin"
    SOFTWARE-VERSION "13.3.0"
    MACHINE-INSTANCE "larissa.local"
    MACHINE-TYPE "x86_64"
    MACHINE-VERSION "MacBookAir6,2"
    *FEATURES* (:bordeaux-threads :thread-support :objc-support :cocoa-10.9 :cocoa-10.8 :cocoa-10.7 :cocoa-10.6 :cocoa-10.5 :cocoa-10.4 :cocoa :hemlock :apple-objc-2.0 :apple-objc patchwork.builder::use-cl-midi cffi-features:flat-namespace cffi-features:x86-64 cffi-features:unix cffi-features:darwin :cffi cffi-sys::flat-namespace :bsd :little-endian :swank :com.informatimago.pjb :split-sequence :closer-mop :com.informatimago.common-lisp.lisp.cl-stepper :newline-is-linefeed :has-ascii-code :has-vt :has-bell :has-escape :has-linefeed :has-return :has-backspace :has-tab :has-page :has-rubout :quicklisp :asdf3 :asdf2 :asdf :os-unix :asdf-unicode :primary-classes :common-lisp :openmcl :ccl :ccl-1.2 :ccl-1.3 :ccl-1.4 :ccl-1.5 :ccl-1.6 :ccl-1.7 :ccl-1.8 :ccl-1.9 :clozure :clozure-common-lisp :ansi-cl :unix :openmcl-unicode-strings :openmcl-native-threads :openmcl-partial-mop :mcl-common-mop-subset :openmcl-mop-2 :openmcl-private-hash-tables :x86-64 :x86_64 :x86-target :x86-host :x8664-target :x8664-host :darwin-host :darwin-target :darwinx86-target :darwinx8664-target :darwinx8664-host :64-bit-target :64-bit-host :darwin :little-endian-target :little-endian-host)

    ; No value
    cl-user>

Revision history for this message
Luís Oliveira (luismbo) wrote :

This issue tracker has been by superseded by the one at https://github.com/slime/slime/issues. It's unfortunate that that's not clear. Sorry about that. Please open an issue on github. Thanks!

Changed in slime:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.