Disassembly of long lambda-lists not line-wrapped correctly

Bug #1889456 reported by Wilfredo Velázquez-Rodríguez on 2020-07-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(let ((*print-right-margin* 30))
           (disassemble (lambda (&rest args) args)))
; disassembly for (LAMBDA
                      (
                       &REST
                       ARGS))
; Size: 29 bytes. Origin: #x228ED9B5 ; (LAMBDA
                                                                    (
                                                                     &REST
                                                                     ARGS))
; B5: 498B4510 MOV RAX, [R13+16] ; thread.binding-stack-pointer
; B9: 488945E8 MOV [RBP-24], RAX
; BD: 488BE5 MOV RSP, RBP
; C0: F8 CLC
; C1: 5D POP RBP
; C2: C3 RET
; C3: CC10 INT3 16 ; Invalid argument count trap
; C5: 4C29DF SUB RDI, R11
; C8: 57 PUSH RDI
; C9: FF14255000A021 CALL QWORD PTR [#x21A00050] ; CONS->R11
; D0: EBB1 JMP #x228ED983 ; #<FUNCTION (LAMBDA
                                                              ; ( ..))>

No ; for each line

Stas Boukarev (stassats) wrote :

That's how generic functions are implemented.

Changed in sbcl:
status: New → Invalid
Michał Herda (phoe-krk) wrote :

This is likely a question of printing the LAMBDA in a way where it spans multiple lines, but only the first one is commented out.

; Size: 53 bytes. Origin: #x522B37F8 ; (LAMBDA
                                                                    (
                                                                     &REST
                                                                     SB-PCL::ARGS)
                                                                  :IN
                                                                  SB-PCL::MAKE-INITIAL-DFUN)

Just to make sure there weren't any misunderstandings in case my report wasn't clear enough (it probably wasn't): I'm bringing up the fact that the lines

                                                                     &REST
                                                                     SB-PCL::ARGS)
                                                                  :IN
                                                                  SB-PCL::MAKE-INITIAL-DFUN)

Are not commented in the output unlike the rest of the disassemble output

It's certainly not standard violating, but I noticed it from a buffer configured to syntax highlight as CL and noticed those lines as not being comments.

If that's fine, all good.

Thanks!

Stas Boukarev (stassats) wrote :

Ok, the generic function part was the obscuring part. I'll rewrite the ticket.

Changed in sbcl:
status: Invalid → Confirmed
summary: - Disassembly of generic functions not comment lambda list
+ Disassembly of long lambda-lists not line-wrapped correctly
description: updated

Thank you!

I neglected to test anonymous functions with long lambda lists. Sorry about that

doing

(disassemble (lambda (&rest args) (declare (ignore args))))

Yields an equivalent multi-line output.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers