SWANK breaks trying to read SB-DISASSEM::ALIGN due to a package lock

Bug #1748041 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Was SB-DISASSEM locked recently, or did this symbol go away?

EDIT: I see it was renamed ALIGN-UP. SWANK will need to be updated. Also, why was SWANK referencing a non-exported symbol? API issue here.

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Renaming ALIGN to ALIGN-UP in swank does not fix this.

description: updated
Revision history for this message
Douglas Katzman (dougk) wrote :

cripes. ALIGN was never supposed to be for users (including swank)
align-up is declared inline, so it's inlined and the tree shaker removes it.
Even if it were renamed back to ALIGN it would have that issue. This is sad.

That said, going back to the initial commit in which swank/sbcl started to call disassemble-code-component, it's bogus (certainly now, probably before).

commit 70d4dc9100d3330561f8be12f917822b4a3ab5e4
Author: Helmut Eller <email address hidden>
Date: Wed Nov 24 19:58:37 2004 +0000

 (cond ((sb-kernel:%code-debug-info o)
        (sb-disassem:disassemble-code-component o :stream s))
       (t
        (sb-disassem:disassemble-memory
         (sb-disassem::align
          (+ (logandc2 (sb-kernel:get-lisp-obj-address o)
                       sb-vm:lowtag-mask)
             (* sb-vm:code-constants-offset
                sb-vm:n-word-bytes))
          (ash 1 sb-vm:n-lowtag-bits))
         (ash (sb-kernel:%code-code-size o) sb-vm:word-shift)
         :stream s)))))))

It SHOULD NOT be trying to compute the bounds on what to disassemble.
It should just call disassemble-code-component in any case. (The COND should go away)
The second branch became even *more* wrong after Stas changed SB-KERNEL:%CODE-CODE-SIZE to return bytes instead of words. (The ASH shouldn't be there)

So fundamentally, this is all wrong and somebody with Slime commit access should simplify that code

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

I created an issue for this over in the Slime github.

https://github.com/slime/slime/issues/429

Revision history for this message
Stas Boukarev (stassats) wrote :

In ef3f1195c7ea8fc81b8d526b9a0d0425cc507e7f.

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
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.