error assembling MOVZX

Bug #1930309 reported by John Carroll
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
McCLIM
Undecided
Unassigned
SBCL
Undecided
Unassigned

Bug Description

In 2.1.5, attempting to compile 3bz (via Quicklisp) fails with an error. I'm trying to compile McCLIM, which requires 3bz. I notice that there's been a commit recently that relates to the MOVZX emitter - perhaps that's the culprit.

Error message and excerpt from backtrace below.

debugger invoked on a SB-INT:BUG @53117D3A in thread
#<THREAD "main thread" RUNNING {10015482C3}>:
    failed AVER: (NOT (EQUAL SB-X86-64-ASM::SIZES '(:DWORD :QWORD)))
  This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
  corrupted by bad user code, e.g. by an undefined Lisp operation like
  (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe
  Lisp code; or there might be a bug in the OS or hardware that SBCL is running
  on.) If it seems to be a bug in SBCL itself, the maintainers would like to
  know about it. Bug reports are welcome on the SBCL mailing lists, which you
  can find at <http://sbcl.sourceforge.net/>.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY ] Retry
                                     compiling #<CL-SOURCE-FILE "3bz" "deflate">.
  1: [ACCEPT ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "3bz" "deflate">
                                     as having been successful.
  2: Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4: Retry ASDF operation.
  5: Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT ] Give up on "mcclim"
  7: Exit debugger, returning to top level.

("MOVZX" #<SB-ASSEM:SEGMENT {104437E193}> (:DWORD :QWORD) RCX #<SB-X86-64-ASM::EA base=#<SB-C:TN t1[RCX] :LOAD> index=#<SB-C:TN t2[RAX] :NORMAL> disp=1>)

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10015482C3}>
0: ("MOVZX" #<SB-ASSEM:SEGMENT {104437E193}> (:DWORD :QWORD) RCX #<SB-X86-64-ASM::EA base=#<SB-C:TN t1[RCX] :LOAD> index=#<SB-C:TN t2[RAX] :NORMAL> disp=1>)
1: (SB-ASSEM::%ASSEMBLE #<SB-ASSEM:SEGMENT {104437E193}> (#<SB-ASSEM::STMT IGNORE {104427BCC3}> . #<SB-ASSEM::STMT .ALIGN {104437E353}>))
...
16: (SB-C::PROCESS-TOPLEVEL-FORM (DEFUN-WITH-READER-CONTEXTS DECOMPRESS-DEFLATE (READ-CONTEXT STATE) (READ-CONTEXT) (DECLARE (OPTIMIZE SPEED)) (WITH-CACHED-STATE (STATE DEFLATE-STATE SAVE-STATE PARTIAL-BITS BITS-REMAINING CURRENT-HUFFMAN-TREE OUTPUT-OFFSET CURRENT-STATE BYTES-TO-COPY OUTPUT-BUFFER) (SETF OUTPUT-OVERFLOW NIL INPUT-UNDERRUN NIL) (MACROLET ((BITS* # #) (EOI NIL #) (EOO NIL #)) (LET (#) (LABELS # # #))) (SAVE-STATE) OUTPUT-OFFSET)) (SB-C::ORIGINAL-SOURCE-START 0 4) NIL)
17: ((LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-C::SUB-COMPILE-FILE) (DEFUN-WITH-READER-CONTEXTS DECOMPRESS-DEFLATE (READ-CONTEXT STATE) (READ-CONTEXT) (DECLARE (OPTIMIZE SPEED)) (WITH-CACHED-STATE (STATE DEFLATE-STATE SAVE-STATE PARTIAL-BITS BITS-REMAINING CURRENT-HUFFMAN-TREE OUTPUT-OFFSET CURRENT-STATE BYTES-TO-COPY OUTPUT-BUFFER) (SETF OUTPUT-OVERFLOW NIL INPUT-UNDERRUN NIL) (MACROLET ((BITS* # #) (EOI NIL #) (EOO NIL #)) (LET (#) (LABELS # # #))) (SAVE-STATE) OUTPUT-OFFSET)) :CURRENT-INDEX 4)
18: (SB-C::%DO-FORMS-FROM-INFO #<FUNCTION (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-C::SUB-COMPILE-FILE) {52C17DFB}> #<SB-C::SOURCE-INFO {103F5B75F3}> SB-C::INPUT-ERROR-IN-COMPILE-FILE)
19: ((FLET "LAMBDA0" :IN "SYS:SRC;COMPILER;MAIN.LISP"))
20: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
21: (SB-C::SUB-COMPILE-FILE #<SB-C::SOURCE-INFO {103F5B75F3}> NIL)
22: (COMPILE-FILE #P"/Volumes/LocalDataHD/johnca/common-lisp/quicklisp/dists/quicklisp/software/3bz-20201220-git/deflate.lisp" :OUTPUT-FILE #P"/Volumes/LocalDataHD/johnca/.cache/common-lisp/sbcl-2.1.5-macosx-x64/Volumes/LocalDataHD/johnca/common-lisp/quicklisp/dists/quicklisp/software/3bz-20201220-git/deflate-tmpRGFDTO86.fasl" :VERBOSE NIL :PRINT NIL :PROGRESS NIL :EXTERNAL-FORMAT :UTF-8 :TRACE-FILE NIL :BLOCK-COMPILE NIL :ENTRY-POINTS NIL :EMIT-CFASL NIL)

$ sbcl --version
SBCL 2.1.5
$ uname -a
... 18.7.0 Darwin Kernel Version 18.7.0: Mon Mar 8 22:11:48 PST 2021; root:xnu-4903.278.65~1/RELEASE_X86_64 x86_64
* *features*
(:X86-64 :GENCGC :64-BIT :ANSI-CL :BSD :COMMON-LISP :DARWIN
 :IEEE-FLOATING-POINT :LITTLE-ENDIAN :MACH-O :PACKAGE-LOCAL-NICKNAMES
 :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL
 :UNIX)

Revision history for this message
John Carroll (jacarroll) wrote :

Apologies for adding this to McCLIM - it's an sbcl bug that affects McCLIM

Revision history for this message
Jan Moringen (scymtym) wrote :

This is probably caused by the following dependency chain: mcclim -> opticl -> pngload -> 3bz -> nibbles. I hopefully fixed the nibbles problem in this commit: https://github.com/sharplispers/nibbles/commit/dad25240928d5cf8f7df69c4398244e03570bb35. So things should work again when the nibbles fix gets into Quicklisp.

Revision history for this message
JVD (jason-vas-dias) wrote :
Download full text (10.5 KiB)

Any idea when / how nibbles will be getting updated ?

I too am having this problem - I'd like to investigate MCCLIM .

My backtrace, from sbcl-2.1.6, on x86_64 linux, under SLIME 2.26 :

CL-USER> (ql:quickload "mcclim")
...
[package 3bz].................
failed AVER:
    (NOT (EQUAL SB-X86-64-ASM::SIZES '(:DWORD :QWORD)))
This is probably a bug in SBCL itself. (Alternatively, SBCL
might have been corrupted by bad user code, e.g. by an undefined
Lisp operation like (FMAKUNBOUND 'COMPILE), or by stray pointers
from alien code or from unsafe Lisp code; or there might be a
bug in the OS or hardware that SBCL is running on.) If it seems
to be a bug in SBCL itself, the maintainers would like to know
about it. Bug reports are welcome on the SBCL mailing lists,
which you can find at <http://sbcl.sourceforge.net/>.
   [Condition of type SB-INT:BUG]

Restarts:
 0: [RETRY] Retry compiling #<CL-SOURCE-FILE "3bz" "deflate">.
 1: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "3bz" "deflate"> as having been successful.
 2: [RETRY] Retry ASDF operation.
 3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 4: [RETRY] Retry ASDF operation.
 5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 --more--

Backtrace:
  0: ("MOVZX" #<SB-ASSEM:SEGMENT {1008D5E403}> (:DWORD :QWORD) RCX #<SB-X86-64-ASM::EA base=#<SB-C:TN t1[RCX] :LOAD> index=#<SB-C:TN t2[RAX] :NORMAL> disp=1>)
  1: (SB-ASSEM::%ASSEMBLE #<SB-ASSEM:SEGMENT {1008D5E403}> (#<SB-ASSEM::STMT IGNORE {1008C2BCC3}> . #<SB-ASSEM::STMT .ALIGN {1008D5E5C3}>))
  2: (SB-ASSEM:ASSEMBLE-SECTIONS #S(SB-ASSEM::ASMSTREAM :DATA-SECTION (#<SB-ASSEM::STMT IGNORE {1008C2BCC3}> . #<SB-ASSEM::STMT .ALIGN {1008D5E5C3}>) :CODE-SECTION (#1=#<SB-ASSEM::STMT IGNORE {1008C2BD13}>..
  3: (SB-C::GENERATE-CODE #<SB-C:COMPONENT :NAME (FLET 3BZ::SAVE-STATE :IN 3BZ::DECOMPRESS-DEFLATE/VECTOR) {1008909BB3}>)
  4: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (FLET 3BZ::SAVE-STATE :IN 3BZ::DECOMPRESS-DEFLATE/VECTOR) {1008909BB3}>)
  5: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (FLET 3BZ::SAVE-STATE :IN 3BZ::DECOMPRESS-DEFLATE/VECTOR) {1008909BB3}>)
  6: (SB-C::%COMPILE (SB-INT:NAMED-LAMBDA 3BZ::DECOMPRESS-DEFLATE/VECTOR (3BZ::READ-CONTEXT 3BZ::STATE) (DECLARE (SB-C::TOP-LEVEL-FORM)) (BLOCK 3BZ::DECOMPRESS-DEFLATE/VECTOR (3BZ::WITH-VECTOR-CONTEXT # #)..
  7: (SB-C::FOPCOMPILE-FUNCTION #<SB-FASL:FASL-OUTPUT "/usr/share/common-lisp/sbcl-2.1.6-1.fc34-linux-x64/usr/share/common-lisp/quicklisp/dists/quicklisp/software/3bz-20201220-git/deflate-tmp1GA879MW.fasl"..
  8: (SB-C::FOPCOMPILE (SB-IMPL::%DEFUN (QUOTE 3BZ::DECOMPRESS-DEFLATE/VECTOR) (SB-INT:NAMED-LAMBDA 3BZ::DECOMPRESS-DEFLATE/VECTOR (3BZ::READ-CONTEXT 3BZ::STATE) (DECLARE #) (BLOCK 3BZ::DECOMPRESS-DEFLATE/..
  9: (SB-C::CONVERT-AND-MAYBE-COMPILE (SB-IMPL::%DEFUN (QUOTE 3BZ::DECOMPRESS-DEFLATE/VECTOR) (SB-INT:NAMED-LAMBDA 3BZ::DECOMPRESS-DEFLATE/VECTOR (3BZ::READ-CONTEXT 3BZ::STATE) (DECLARE #) (BLOCK 3BZ::DECO..
 10: (SB-C::PROCESS-TOPLEVEL-FORM (SB-IMPL::%DEFUN (QUOTE 3BZ::DECOMPRESS-DEFLATE/VECTOR) (SB-INT:NAMED-LAMBDA 3BZ::DECOMPRESS-DEFLATE/VECTOR (3BZ::READ-CONTEXT 3BZ::STATE) (DECLAR...

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

>Any idea when / how nibbles will be getting updated ?

It's already updated.

Changed in sbcl:
status: New → Invalid
Revision history for this message
JVD (jason-vas-dias) wrote :

Building the latest nibbles from GIT master does then
allow 3bz and mcclim to build, as noted in Bug #1937134 .

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

Duplicates of this bug

Other bug subscribers